Ejemplo n.º 1
0
 public override Microsoft.XLANGs.Core.PortBase Clone()
 {
     PortType_Receive940FlatFile p = new PortType_Receive940FlatFile(this);
     return p;
 }
Ejemplo n.º 2
0
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Envelope __msgEnv__ = null;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[1];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __SZDWmsWebServiceClient_root_0 __ctx0__ = (__SZDWmsWebServiceClient_root_0)_stateMgrs[0];
            __SZDWmsWebServiceClient_1 __ctx1__ = (__SZDWmsWebServiceClient_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__strContent = default(System.String);
                __ctx1__.__pulllistNo = default(System.String);
                __ctx1__.__siteCode = default(System.String);
                __ctx1__.__Reqdate = default(System.String);
                __ctx1__.__strType = default(System.String);
                __ctx__.PrologueCompleted = true;
                if ( !PostProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 1;
            case 1:
                if ( !PreProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[0],__eventData[0],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 2;
            case 2:
                if ( !PreProgressInc( __seg__, __ctx__, 3 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[1],__eventData[1],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 3;
            case 3:
                if (!Receive940FlatFile.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__CM940Message != null)
                    __ctx1__.UnrefMessage(__ctx1__.__CM940Message);
                __ctx1__.__CM940Message = new __messagetype_Kaifa_B2B_Schemas__940_CM_940_Inbound("CM940Message", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__CM940Message);
                Receive940FlatFile.ReceiveMessage(0, __msgEnv__, __ctx1__.__CM940Message, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (Receive940FlatFile != null)
                {
                    Receive940FlatFile.Close(__ctx1__, __seg__);
                    Receive940FlatFile = null;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 4;
            case 4:
                if ( !PreProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Receive);
                    __edata.Messages.Add(__ctx1__.__CM940Message);
                    __edata.PortName = @"Receive940FlatFile";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                __ctx1__.__strContent = "";
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx1__.__pulllistNo = "";
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                __ctx1__.__siteCode = "";
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                __ctx1__.__Reqdate = "";
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                __ctx1__.__strType = "";
                if ( !PostProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 10;
            case 10:
                if ( !PreProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[4],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 11;
            case 11:
                {
                    __messagetype_Kaifa_B2B_Schemas_InforAPI_InforShipmentOrder __ShipmentOrder = new __messagetype_Kaifa_B2B_Schemas_InforAPI_InforShipmentOrder("ShipmentOrder", __ctx1__);

                    ApplyTransform(typeof(Kaifa.B2B.Orchestration.SZD940.Mapping.Cm_940_To_ShipmentOrder), new object[] {__ShipmentOrder.part}, new object[] {__ctx1__.__CM940Message.part});

                    if (__ctx1__.__ShipmentOrder != null)
                        __ctx1__.UnrefMessage(__ctx1__.__ShipmentOrder);
                    __ctx1__.__ShipmentOrder = __ShipmentOrder;
                    __ctx1__.RefMessage(__ctx1__.__ShipmentOrder);
                }
                __ctx1__.__ShipmentOrder.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 12;
            case 12:
                if ( !PreProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Construct);
                    __edata.Messages.Add(__ctx1__.__ShipmentOrder);
                    __edata.Messages.Add(__ctx1__.__CM940Message);
                    Tracker.FireEvent(__eventLocations[5],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 13;
            case 13:
                if ( !PreProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[6],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 14;
            case 14:
                {
                    callBackEndRequest __CallServiceRequest = new callBackEndRequest("CallServiceRequest", __ctx1__);

                    ApplyTransform(typeof(Kaifa.B2B.Orchestration.SZD940.Mapping.initMap), new object[] {__CallServiceRequest.parameters}, new object[] {__ctx1__.__ShipmentOrder.part});
                    __ctx1__.__strContent = Kaifa.B2B.Utility.HeaderHelper.ReturnStringRemoveNamespace(__ctx1__.__ShipmentOrder.part.TypedValue);
                    Kaifa.B2B.Utility.HeaderHelper.AssignmentInforRequest(__CallServiceRequest.parameters.TypedValue, "MessageProcessor", "ShipmentOrder", "storeByQuote", __ctx1__.__strContent);
                    if (__ctx1__ != null)
                        __ctx1__.__strContent = null;

                    if (__ctx1__.__CallServiceRequest != null)
                        __ctx1__.UnrefMessage(__ctx1__.__CallServiceRequest);
                    __ctx1__.__CallServiceRequest = __CallServiceRequest;
                    __ctx1__.RefMessage(__ctx1__.__CallServiceRequest);
                }
                __ctx1__.__CallServiceRequest.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 15;
            case 15:
                if ( !PreProgressInc( __seg__, __ctx__, 16 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Construct);
                    __edata.Messages.Add(__ctx1__.__CallServiceRequest);
                    __edata.Messages.Add(__ctx1__.__ShipmentOrder);
                    Tracker.FireEvent(__eventLocations[7],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__ShipmentOrder != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__ShipmentOrder);
                    __ctx1__.__ShipmentOrder = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 16;
            case 16:
                if ( !PreProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[8],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 17;
            case 17:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 18;
            case 18:
                if ( !PreProgressInc( __seg__, __ctx__, 19 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                InvokeInforWebService.SendMessage(0, __ctx1__.__CallServiceRequest, null, null, out __ctx0__.__subWrapper1, __ctx1__, __seg__ );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 19;
            case 19:
                if ( !PreProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Send);
                    __edata.Messages.Add(__ctx1__.__CallServiceRequest);
                    __edata.PortName = @"InvokeInforWebService";
                    Tracker.FireEvent(__eventLocations[9],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__CallServiceRequest != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__CallServiceRequest);
                    __ctx1__.__CallServiceRequest = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 20;
            case 20:
                if ( !PreProgressInc( __seg__, __ctx__, 21 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[10],__eventData[1],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 21;
            case 21:
                if (!InvokeInforWebService.GetMessageId(__ctx0__.__subWrapper1.getSubscription(this), __seg__, __ctx1__, out __msgEnv__, _locations[0]))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx0__ != null && __ctx0__.__subWrapper1 != null)
                {
                    __ctx0__.__subWrapper1.Destroy(this, __ctx0__);
                    __ctx0__.__subWrapper1 = null;
                }
                if (__ctx1__.__CallServiceReponse != null)
                    __ctx1__.UnrefMessage(__ctx1__.__CallServiceReponse);
                __ctx1__.__CallServiceReponse = new callBackEndResponse("CallServiceReponse", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__CallServiceReponse);
                InvokeInforWebService.ReceiveMessage(0, __msgEnv__, __ctx1__.__CallServiceReponse, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (InvokeInforWebService != null)
                {
                    InvokeInforWebService.Close(__ctx1__, __seg__);
                    InvokeInforWebService = null;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 22 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 22;
            case 22:
                if ( !PreProgressInc( __seg__, __ctx__, 23 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Receive);
                    __edata.Messages.Add(__ctx1__.__CallServiceReponse);
                    __edata.PortName = @"InvokeInforWebService";
                    Tracker.FireEvent(__eventLocations[11],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 23;
            case 23:
                if ( !PreProgressInc( __seg__, __ctx__, 24 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[12],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 24;
            case 24:
                __ctx1__.__pulllistNo = System.Convert.ToString(Microsoft.XLANGs.Core.Part.XPathLoad(__ctx1__.__CM940Message.part, "string(/*[local-name()='CMInbound' and namespace-uri()='http://Kaifa.B2B.Schemas.940.CM_940_Inbound']/*[local-name()='Row' and namespace-uri()='http://Kaifa.B2B.Schemas.940.CM_940_Inbound'][1]/*[local-name()='PullNo' and namespace-uri()='http://Kaifa.B2B.Schemas.940.CM_940_Inbound'])", typeof(System.Object)));
                if ( !PostProgressInc( __seg__, __ctx__, 25 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 25;
            case 25:
                if ( !PreProgressInc( __seg__, __ctx__, 26 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[13],__eventData[5],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 26;
            case 26:
                __ctx1__.__siteCode = System.Convert.ToString(Microsoft.XLANGs.Core.Part.XPathLoad(__ctx1__.__CM940Message.part, "string(/*[local-name()='CMInbound' and namespace-uri()='http://Kaifa.B2B.Schemas.940.CM_940_Inbound']/*[local-name()='Row' and namespace-uri()='http://Kaifa.B2B.Schemas.940.CM_940_Inbound'][1]/*[local-name()='Site' and namespace-uri()='http://Kaifa.B2B.Schemas.940.CM_940_Inbound'])", typeof(System.Object)));
                if ( !PostProgressInc( __seg__, __ctx__, 27 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 27;
            case 27:
                __ctx1__.__strType = System.Convert.ToString(Microsoft.XLANGs.Core.Part.XPathLoad(__ctx1__.__CM940Message.part, "string(/*[local-name()='CMInbound' and namespace-uri()='http://Kaifa.B2B.Schemas.940.CM_940_Inbound']/*[local-name()='Row' and namespace-uri()='http://Kaifa.B2B.Schemas.940.CM_940_Inbound'][1]/*[local-name()='PrimeOnly' and namespace-uri()='http://Kaifa.B2B.Schemas.940.CM_940_Inbound'])", typeof(System.Object)));
                if ( !PostProgressInc( __seg__, __ctx__, 28 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 28;
            case 28:
                __ctx1__.__Reqdate = System.Convert.ToString(Microsoft.XLANGs.Core.Part.XPathLoad(__ctx1__.__CM940Message.part, "string(/*[local-name()='CMInbound' and namespace-uri()='http://Kaifa.B2B.Schemas.940.CM_940_Inbound']/*[local-name()='Row' and namespace-uri()='http://Kaifa.B2B.Schemas.940.CM_940_Inbound'][1]/*[local-name()='RequestDate' and namespace-uri()='http://Kaifa.B2B.Schemas.940.CM_940_Inbound'])", typeof(System.Object)));
                if (__ctx1__ != null && __ctx1__.__CM940Message != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__CM940Message);
                    __ctx1__.__CM940Message = null;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 29 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 29;
            case 29:
                Kaifa.B2B.Utility.MailClient.Send940NotificationMail(__ctx1__.__CallServiceReponse.parameters.TypedValue, __ctx1__.__pulllistNo, __ctx1__.__siteCode, __ctx1__.__Reqdate, __ctx1__.__strType);
                if (__ctx1__ != null)
                    __ctx1__.__strType = null;
                if (__ctx1__ != null)
                    __ctx1__.__Reqdate = null;
                if (__ctx1__ != null)
                    __ctx1__.__siteCode = null;
                if (__ctx1__ != null)
                    __ctx1__.__pulllistNo = null;
                if (__ctx1__ != null && __ctx1__.__CallServiceReponse != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__CallServiceReponse);
                    __ctx1__.__CallServiceReponse = null;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 30 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 30;
            case 30:
                if ( !PreProgressInc( __seg__, __ctx__, 31 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[3],__eventData[6],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 31;
            case 31:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 32 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 32;
            case 32:
                if ( !PreProgressInc( __seg__, __ctx__, 33 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 33;
            case 33:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Ejemplo n.º 3
0
 public PortType_Receive940FlatFile(PortType_Receive940FlatFile p)
     : base(p)
 { }
Ejemplo n.º 4
0
        public Microsoft.XLANGs.Core.StopConditions segment0(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[0];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[0];
            __SZDWmsWebServiceClient_root_0 __ctx0__ = (__SZDWmsWebServiceClient_root_0)_stateMgrs[0];
            __SZDWmsWebServiceClient_1 __ctx1__ = (__SZDWmsWebServiceClient_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                Receive940FlatFile = new PortType_Receive940FlatFile(0, this);
                InvokeInforWebService = new WmsWebServicePortType(1, this);
                __ctx__.PrologueCompleted = true;
                __ctx0__.__subWrapper0 = new Microsoft.XLANGs.Core.SubscriptionWrapper(ActivationSubGuids[0], Receive940FlatFile, this);
                if ( !PostProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.Initialized) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.Initialized;
                goto case 1;
            case 1:
                __ctx1__ = new __SZDWmsWebServiceClient_1(this);
                _stateMgrs[1] = __ctx1__;
                if ( !PostProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 2;
            case 2:
                __ctx0__.StartContext(__seg__, __ctx1__);
                if ( !PostProgressInc( __seg__, __ctx__, 3 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 3:
                if (!__ctx0__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 4;
            case 4:
                __ctx1__.Finally();
                ServiceDone(__seg__, (Microsoft.XLANGs.Core.Context)_stateMgrs[0]);
                __ctx0__.OnCommit();
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }