Beispiel #1
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];
            __RecevingOrders_1             __ctx1__   = (__RecevingOrders_1)_stateMgrs[1];
            __RecevingOrders_root_0        __ctx0__   = (__RecevingOrders_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!Port_OrdersIn.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__msgBookOrders != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgBookOrders);
                }
                __ctx1__.__msgBookOrders = new __messagetype_BooksOrders_BookOrdersCompleted("msgBookOrders", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__msgBookOrders);
                Port_OrdersIn.ReceiveMessage(0, __msgEnv__, __ctx1__.__msgBookOrders, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (Port_OrdersIn != null)
                {
                    Port_OrdersIn.Close(__ctx1__, __seg__);
                    Port_OrdersIn = 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__.__msgBookOrders);
                    __edata.PortName = @"Port_OrdersIn";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                if (!PreProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[3], __eventData[2], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 6;

            case 6:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Port_OrdersOut.SendMessage(0, __ctx1__.__msgBookOrders, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (Port_OrdersOut != null)
                {
                    Port_OrdersOut.Close(__ctx1__, __seg__);
                    Port_OrdersOut = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingRqst);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    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__.__msgBookOrders);
                    __edata.PortName = @"Port_OrdersOut";
                    Tracker.FireEvent(__eventLocations[4], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__msgBookOrders != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgBookOrders);
                    __ctx1__.__msgBookOrders = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!PreProgressInc(__seg__, __ctx__, 10))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 10;

            case 10:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 11))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 12;

            case 12:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
        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];
            __Orch1_root_0 __ctx0__ = (__Orch1_root_0)_stateMgrs[0];
            __Orch1_1      __ctx1__ = (__Orch1_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__var1           = 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 (!Port_1.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__Message_1 != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Message_1);
                }
                __ctx1__.__Message_1 = new __messagetype_Project1_Schema1("Message_1", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__Message_1);
                Port_1.ReceiveMessage(0, __msgEnv__, __ctx1__.__Message_1, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (Port_1 != null)
                {
                    Port_1.Close(__ctx1__, __seg__);
                    Port_1 = 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__.__Message_1);
                    __edata.PortName = @"Port_1";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__Message_1 != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Message_1);
                    __ctx1__.__Message_1 = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                __ctx1__.__var1 = "";
                if (!PostProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 6;

            case 6:
                if (!PreProgressInc(__seg__, __ctx__, 7))
                {
                    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 7;

            case 7:
                __ctx1__.__var1 = "TEST";
                if (__ctx1__ != null)
                {
                    __ctx1__.__var1 = null;
                }
                if (!PostProgressInc(__seg__, __ctx__, 8))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!PreProgressInc(__seg__, __ctx__, 10))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[6], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 10;

            case 10:
            {
                Microsoft.XLANGs.Core.Service svc = new Project2.Orch2(2, InstanceId, this);
                _stateMgrs[2] = svc;
                __ctx1__.StartCall(__seg__, svc, __eventLocations[6], null);
            }
                if (!PostProgressInc(__seg__, __ctx__, 11))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                return(Microsoft.XLANGs.Core.StopConditions.Blocked);

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[7], __eventData[5], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 12;

            case 12:
                if (!PreProgressInc(__seg__, __ctx__, 13))
                {
                    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 13;

            case 13:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 14))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 14;

            case 14:
                if (!PreProgressInc(__seg__, __ctx__, 15))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 15;

            case 15:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
        public Microsoft.XLANGs.Core.StopConditions segment5(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[5];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[4];
            __Transaction_Rules_4 __ctx4__ = (__Transaction_Rules_4)_stateMgrs[4];
            __subImportGuardRecord_1 __ctx1__ = (__subImportGuardRecord_1)_stateMgrs[1];
            __Transaction_2_2 __ctx2__ = (__Transaction_2_2)_stateMgrs[2];

            switch (__seg__.Progress)
            {
            case 0:
                if (__ctx4__.LockRead(0, _segments[5]) == false)  // __subImportGuardRecord_1.__FileId
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 1;
            case 1:
                if (__ctx4__.LockWrite(1, _segments[5]) == false)  // __subImportGuardRecord_1.__validationResult
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 2;
            case 2:
                if (__ctx4__.LockWrite(2, _segments[5]) == false)  // __subImportGuardRecord_1.__businessRulesOK
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 3 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 3;
            case 3:
                if (__ctx4__.LockWrite(3, _segments[5]) == false)  // __subImportGuardRecord_1.__BusinessValidationErrorsMsg
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 4;
            case 4:
                __ctx4__.__nodeValidator = default(Riziv.HODMedega.Validator.MedegaNodeValidator);
                __ctx4__.__validationResult = (System.String)__ctx4__.SaveObject(__ctx1__.__validationResult, 0);
                __ctx4__.__businessRulesOK = __ctx1__.__businessRulesOK;
                __ctx4__.__BusinessValidationErrorsMsg = __ctx1__.__BusinessValidationErrorsMsg;
                if (__ctx4__.__BusinessValidationErrorsMsg != null)
                    __ctx4__.RefMessage(__ctx4__.__BusinessValidationErrorsMsg);
                __ctx__.PrologueCompleted = true;
                if ( !PostProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 5;
            case 5:
                __ctx4__.__nodeValidator = new Riziv.HODMedega.Validator.MedegaNodeValidator();
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                if ( !PreProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[28],__eventData[2],_stateMgrs[4].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 7;
            case 7:
                __ctx4__.__nodeValidator = new Riziv.HODMedega.Validator.MedegaNodeValidator(RIZIV.BizTalk.Common.BTSConfigReader.Instance.ReadConfigValueAsString("MedegaImport", "Medega.StrConn.Validator"));
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                if ( !PreProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[29],__eventData[3],_stateMgrs[4].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 9;
            case 9:
                __ctx4__.__businessRulesOK = __ctx4__.__nodeValidator.ValidateNodesOf(__ctx1__.__FileId, ref __ctx4__.__validationResult);
                if (__ctx4__ != null)
                    __ctx4__.__nodeValidator = null;
                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[30],__eventData[4],_stateMgrs[4].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 11;
            case 11:
                {
                    BusinessValidationErrors __BusinessValidationErrorsMsg = new BusinessValidationErrors("BusinessValidationErrorsMsg", __ctx4__);

                    __BusinessValidationErrorsMsg.FileId.LoadFrom("FileId = " + System.Convert.ToString(__ctx1__.__FileId));
                    __BusinessValidationErrorsMsg.BusinessErrorMessages.LoadFrom(__ctx4__.__validationResult);

                    if (__ctx4__.__BusinessValidationErrorsMsg != null)
                        __ctx4__.UnrefMessage(__ctx4__.__BusinessValidationErrorsMsg);
                    __ctx4__.__BusinessValidationErrorsMsg = __BusinessValidationErrorsMsg;
                    __ctx4__.RefMessage(__ctx4__.__BusinessValidationErrorsMsg);
                }
                __ctx4__.__BusinessValidationErrorsMsg.ConstructionCompleteEvent(false);
                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(__ctx4__.__BusinessValidationErrorsMsg);
                    Tracker.FireEvent(__eventLocations[31],__edata,_stateMgrs[4].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 13;
            case 13:
                if (!__ctx4__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 14;
            case 14:
                if ( !PreProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx4__.OnCommit();
                goto case 15;
            case 15:
                __seg__.SegmentDone();
                _segments[2].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #4
0
        public Microsoft.XLANGs.Core.StopConditions segment2(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            bool __condition__;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[2];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __SZDSOI_Orchestration_root_0 __ctx0__ = (__SZDSOI_Orchestration_root_0)_stateMgrs[0];
            __SZDSOI_Orchestration_1 __ctx1__ = (__SZDSOI_Orchestration_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                if ( !PreProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[13],__eventData[8],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 1;
            case 1:
                __condition__ = __ctx1__.__SCHEDULELocation == "schedule://Daily/SZDReceiveSOIReport12AM";
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 16 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 16;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 2;
            case 2:
                if ( !PreProgressInc( __seg__, __ctx__, 3 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[14],__eventData[6],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 3;
            case 3:
                {
                    __messagetype_Kaifa_B2B_Schemas_RosettaNet_SGRTHUB4C1_MS_1_0_SupplierOwnInventory __Pip4C1ForSTXMessage = new __messagetype_Kaifa_B2B_Schemas_RosettaNet_SGRTHUB4C1_MS_1_0_SupplierOwnInventory("Pip4C1ForSTXMessage", __ctx1__);

                    ApplyTransform(typeof(Kaifa.B2B.SZD.Mapping.Inventory_To_4C1_STX), new object[] {__Pip4C1ForSTXMessage.part}, new object[] {__ctx1__.__VendorReportMessage.part});
                    __ctx1__.__pipInstanceIdentifierForSTX = (System.String)__Pip4C1ForSTXMessage.part.GetDistinguishedField("thisDocumentIdentifier.ProprietaryDocumentIdentifier");
                    __Pip4C1ForSTXMessage.SetPropertyValue(typeof(FILE.ReceivedFileName), "SOI_To_STX_" + __ctx1__.__pipInstanceIdentifierForSTX + ".xml");

                    if (__ctx1__.__Pip4C1ForSTXMessage != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Pip4C1ForSTXMessage);
                    __ctx1__.__Pip4C1ForSTXMessage = __Pip4C1ForSTXMessage;
                    __ctx1__.RefMessage(__ctx1__.__Pip4C1ForSTXMessage);
                }
                __ctx1__.__Pip4C1ForSTXMessage.ConstructionCompleteEvent(true);
                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.Construct);
                    __edata.Messages.Add(__ctx1__.__Pip4C1ForSTXMessage);
                    __edata.Messages.Add(__ctx1__.__VendorReportMessage);
                    Tracker.FireEvent(__eventLocations[15],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[16],__eventData[9],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                SendPip4C1Message.SendMessage(0, __ctx1__.__Pip4C1ForSTXMessage, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.None );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 8;
            case 8:
                if ( !PreProgressInc( __seg__, __ctx__, 9 ) )
                    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__.__Pip4C1ForSTXMessage);
                    __edata.PortName = @"SendPip4C1Message";
                    Tracker.FireEvent(__eventLocations[17],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[18],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 10;
            case 10:
                __ctx1__.__pipInstanceMessageIdForSTX = (System.String)__ctx1__.__Pip4C1ForSTXMessage.GetPropertyValueThrows(typeof(BTS.MessageID));
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 11:
                if ( !PreProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[19],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 12;
            case 12:
                __ctx1__.__strPipMessageForSTX = Kaifa.B2B.Utility.HeaderHelper.ReturnSCWithDocType(__ctx1__.__Pip4C1ForSTXMessage.part.TypedValue, "4C1R0200");
                if ( !PostProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 13;
            case 13:
                System.Diagnostics.Trace.WriteLine("SubmitRNIF.SubmitMessage To STX " + __ctx1__.__pipInstanceMessageIdForSTX + " - " + __ctx1__.__pipInstanceIdentifierForSTX, "kaifa.b2b");
                if ( !PostProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 14;
            case 14:
                __ctx1__.__SubmitRNIF.SubmitMessage(Microsoft.Solutions.BTARN.Shared.MessageCategory.AsyncAction, "KAIFA", "SEAGATE-US", "4C1", __ctx1__.__pipInstanceIdentifierForSTX, "R02.00", __ctx1__.__strPipMessageForSTX);
                if ( !PostProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 15;
            case 15:
                if ( !PostProgressInc( __seg__, __ctx__, 32 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 32;
            case 16:
                if ( !PreProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[20],__eventData[8],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 17;
            case 17:
                __condition__ = __ctx1__.__SCHEDULELocation == "schedule://TimeSpan/SZDReceiveSOIReportTest";
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 31 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 31;
                }
                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;
                Tracker.FireEvent(__eventLocations[22],__eventData[6],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 19;
            case 19:
                {
                    __messagetype_Kaifa_B2B_Schemas_RosettaNet_SGRTHUB4C1_MS_1_0_SupplierOwnInventory __Pip4C1ForSTXMessage = new __messagetype_Kaifa_B2B_Schemas_RosettaNet_SGRTHUB4C1_MS_1_0_SupplierOwnInventory("Pip4C1ForSTXMessage", __ctx1__);

                    ApplyTransform(typeof(Kaifa.B2B.SZD.Mapping.Inventory_To_4C1_STX), new object[] {__Pip4C1ForSTXMessage.part}, new object[] {__ctx1__.__VendorReportMessage.part});
                    __ctx1__.__pipInstanceIdentifierForSTX = (System.String)__Pip4C1ForSTXMessage.part.GetDistinguishedField("thisDocumentIdentifier.ProprietaryDocumentIdentifier");
                    __Pip4C1ForSTXMessage.SetPropertyValue(typeof(FILE.ReceivedFileName), "SOI_To_STX_" + __ctx1__.__pipInstanceIdentifierForSTX + ".xml");

                    if (__ctx1__.__Pip4C1ForSTXMessage != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Pip4C1ForSTXMessage);
                    __ctx1__.__Pip4C1ForSTXMessage = __Pip4C1ForSTXMessage;
                    __ctx1__.RefMessage(__ctx1__.__Pip4C1ForSTXMessage);
                }
                __ctx1__.__Pip4C1ForSTXMessage.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 20;
            case 20:
                if ( !PreProgressInc( __seg__, __ctx__, 21 ) )
                    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__.__Pip4C1ForSTXMessage);
                    __edata.Messages.Add(__ctx1__.__VendorReportMessage);
                    Tracker.FireEvent(__eventLocations[23],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 21;
            case 21:
                if ( !PreProgressInc( __seg__, __ctx__, 22 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[24],__eventData[9],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 22;
            case 22:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 23 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 23;
            case 23:
                if ( !PreProgressInc( __seg__, __ctx__, 24 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                SendPip4C1Message.SendMessage(0, __ctx1__.__Pip4C1ForSTXMessage, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.None );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 24;
            case 24:
                if ( !PreProgressInc( __seg__, __ctx__, 25 ) )
                    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__.__Pip4C1ForSTXMessage);
                    __edata.PortName = @"SendPip4C1Message";
                    Tracker.FireEvent(__eventLocations[25],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 25;
            case 25:
                if ( !PreProgressInc( __seg__, __ctx__, 26 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[26],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 26;
            case 26:
                __ctx1__.__pipInstanceMessageIdForSTX = (System.String)__ctx1__.__Pip4C1ForSTXMessage.GetPropertyValueThrows(typeof(BTS.MessageID));
                if ( !PostProgressInc( __seg__, __ctx__, 27 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 27;
            case 27:
                if ( !PreProgressInc( __seg__, __ctx__, 28 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[27],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 28;
            case 28:
                __ctx1__.__strPipMessageForSTX = Kaifa.B2B.Utility.HeaderHelper.ReturnSCWithDocType(__ctx1__.__Pip4C1ForSTXMessage.part.TypedValue, "4C1R0200");
                if ( !PostProgressInc( __seg__, __ctx__, 29 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 29;
            case 29:
                System.Diagnostics.Trace.WriteLine("SubmitRNIF.SubmitMessage To STX " + __ctx1__.__pipInstanceMessageIdForSTX + " - " + __ctx1__.__pipInstanceIdentifierForSTX, "kaifa.b2b");
                if ( !PostProgressInc( __seg__, __ctx__, 30 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 30;
            case 30:
                __ctx1__.__SubmitRNIF.SubmitMessage(Microsoft.Solutions.BTARN.Shared.MessageCategory.AsyncAction, "KAIFA", "SEAGATE-US", "4C1", __ctx1__.__pipInstanceIdentifierForSTX, "R02.00", __ctx1__.__strPipMessageForSTX);
                if ( !PostProgressInc( __seg__, __ctx__, 31 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 31;
            case 31:
                if ( !PreProgressInc( __seg__, __ctx__, 32 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[21],__eventData[10],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 32;
            case 32:
                if ( !PreProgressInc( __seg__, __ctx__, 33 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null && __ctx1__.__Pip4C1ForSTXMessage != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Pip4C1ForSTXMessage);
                    __ctx1__.__Pip4C1ForSTXMessage = null;
                }
                Tracker.FireEvent(__eventLocations[28],__eventData[10],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 33;
            case 33:
                __seg__.SegmentDone();
                _segments[1].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Envelope __msgEnv__ = null;
            bool __condition__;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[1];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __ImportGuards_root_0 __ctx0__ = (__ImportGuards_root_0)_stateMgrs[0];
            __ImportGuards_1 __ctx1__ = (__ImportGuards_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__FileStatusID = default(System.Int32);
                __ctx1__.__FileID = default(System.Int32);
                __ctx1__.__NewFileStatusID = default(System.Int32);
                __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 (!ReceiveGuards.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__GuardsFile != null)
                    __ctx1__.UnrefMessage(__ctx1__.__GuardsFile);
                __ctx1__.__GuardsFile = new __messagetype_MedegaImportSchema_Schemas_Medega_Guard("GuardsFile", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__GuardsFile);
                ReceiveGuards.ReceiveMessage(0, __msgEnv__, __ctx1__.__GuardsFile, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (ReceiveGuards != null)
                {
                    ReceiveGuards.Close(__ctx1__, __seg__);
                    ReceiveGuards = 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__.__GuardsFile);
                    __edata.PortName = @"ReceiveGuards";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[3],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                {
                    Microsoft.XLANGs.Core.Service svc = new MedegaImport.subImportFile(2, InstanceId, this);
                    _stateMgrs[2] = svc;
                    __ctx1__.StartCall(__seg__, svc, __eventLocations[3],new object[] {null, null, __ctx1__.__GuardsFile, new Microsoft.XLANGs.Core.MessageTuple((Microsoft.XLANGs.Core.Context)_stateMgrs[1], null)});
                }
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    object[] args = ((Microsoft.XLANGs.Core.Service)_stateMgrs[2]).Args;
                    __ctx1__.__FileID = (System.Int32)args[0];
                    __ctx1__.__FileStatusID = (System.Int32)args[1];
                    __ctx1__.__SQLCreateMedegaFileResponse = (CreateMedegaFileResponse)((Microsoft.XLANGs.Core.MessageTuple)(args[3])).message;
                    __ctx1__.__SQLCreateMedegaFileResponse.MessageName = "SQLCreateMedegaFileResponse";
                }
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Call);
                    __edata.Messages.Add(__ctx1__.__GuardsFile);
                    __edata.Messages.Add(__ctx1__.__SQLCreateMedegaFileResponse);
                    Tracker.FireEvent(__eventLocations[4],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                if ( !PreProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[5],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 9;
            case 9:
                __condition__ = __ctx1__.__FileStatusID == System.Convert.ToInt32(MedegaImport.MedegaImportTypes.MedegaFileStatusEnum.ImportStarted) && __ctx1__.__FileStatusID != -99;
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 14 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 14;
                }
                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[6],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 11;
            case 11:
                {
                    Microsoft.XLANGs.Core.Service svc = new MedegaImport.subImportGuardRecord(3, InstanceId, this);
                    _stateMgrs[3] = svc;
                    __ctx1__.StartCall(__seg__, svc, __eventLocations[6],new object[] {__ctx1__.__GuardsFile, __ctx1__.__SQLCreateMedegaFileResponse, __ctx1__.__FileID});
                }
                if ( !PostProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 12:
                if ( !PreProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    object[] args = ((Microsoft.XLANGs.Core.Service)_stateMgrs[3]).Args;
                }
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Call);
                    __edata.Messages.Add(__ctx1__.__GuardsFile);
                    __edata.Messages.Add(__ctx1__.__SQLCreateMedegaFileResponse);
                    Tracker.FireEvent(__eventLocations[7],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 13;
            case 13:
                if ( !PostProgressInc( __seg__, __ctx__, 22 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 22;
            case 14:
                if ( !PreProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[8],__eventData[5],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 15;
            case 15:
                __ctx1__.__NewFileStatusID = System.Convert.ToInt32(MedegaImport.MedegaImportTypes.MedegaFileStatusEnum.InError);
                if ( !PostProgressInc( __seg__, __ctx__, 16 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 16;
            case 16:
                if ( !PreProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[9],__eventData[6],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 17;
            case 17:
                if ( !PreProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[10],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 18;
            case 18:
                {
                    Microsoft.XLANGs.Core.Service svc = new MedegaImport.subUpdateFileStatus(4, InstanceId, this);
                    _stateMgrs[4] = svc;
                    __ctx1__.StartCall(__seg__, svc, __eventLocations[10],new object[] {__ctx1__.__FileID, __ctx1__.__NewFileStatusID});
                }
                if ( !PostProgressInc( __seg__, __ctx__, 19 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 19:
                if ( !PreProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    object[] args = ((Microsoft.XLANGs.Core.Service)_stateMgrs[4]).Args;
                }
                Tracker.FireEvent(__eventLocations[11],__eventData[3],_stateMgrs[1].TrackDataStream );
                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[12],__eventData[7],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 21;
            case 21:
                RequestTerminate(__ctx1__,"The file status after ImportFile is not correct to continue");
                __seg__.SegmentDone();
                break;
            case 22:
                if ( !PreProgressInc( __seg__, __ctx__, 23 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null && __ctx1__.__SQLCreateMedegaFileResponse != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__SQLCreateMedegaFileResponse);
                    __ctx1__.__SQLCreateMedegaFileResponse = null;
                }
                if (__ctx1__ != null && __ctx1__.__GuardsFile != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__GuardsFile);
                    __ctx1__.__GuardsFile = null;
                }
                Tracker.FireEvent(__eventLocations[13],__eventData[8],_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[14],__eventData[9],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 24;
            case 24:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                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;
                __ctx1__.OnCommit();
                goto case 26;
            case 26:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
        public Microsoft.XLANGs.Core.StopConditions segment4(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[4];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[3];
            __subImportFile_1 __ctx1__ = (__subImportFile_1)_stateMgrs[1];
            ____scope38_3 __ctx3__ = (____scope38_3)_stateMgrs[3];

            switch (__seg__.Progress)
            {
            case 0:
                OnBeginCatchHandler(3);
                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[24],__eventData[10],_stateMgrs[3].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[25],__eventData[2],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 3;
            case 3:
                {
                    __messagetype_System_Xml_XmlDocument __ExceptionMsg = new __messagetype_System_Xml_XmlDocument("ExceptionMsg", __ctx1__);

                    __ExceptionMsg.part.CopyFrom(__ctx1__.__SQLCreateMedegaFileResponse.parameters);

                    if (__ctx1__.__ExceptionMsg != null)
                        __ctx1__.UnrefMessage(__ctx1__.__ExceptionMsg);
                    __ctx1__.__ExceptionMsg = __ExceptionMsg;
                    __ctx1__.RefMessage(__ctx1__.__ExceptionMsg);
                }
                __ctx1__.__ExceptionMsg.ConstructionCompleteEvent(false);
                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.Construct);
                    __edata.Messages.Add(__ctx1__.__ExceptionMsg);
                    Tracker.FireEvent(__eventLocations[26],__edata,_stateMgrs[3].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[27],__eventData[11],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                throw __ctx1__.__ImportFileException;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[28],__eventData[12],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                OnEndCatchHandler(3, __seg__);
                __seg__.SegmentDone();
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #7
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];
            __AnnoyingTordOrch_1           __ctx1__   = (__AnnoyingTordOrch_1)_stateMgrs[1];
            __AnnoyingTordOrch_root_0      __ctx0__   = (__AnnoyingTordOrch_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!InputPort.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__msgInput != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgInput);
                }
                __ctx1__.__msgInput = new __messagetype_System_Xml_XmlDocument("msgInput", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__msgInput);
                InputPort.ReceiveMessage(0, __msgEnv__, __ctx1__.__msgInput, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (InputPort != null)
                {
                    InputPort.Close(__ctx1__, __seg__);
                    InputPort = 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__.__msgInput);
                    __edata.PortName = @"InputPort";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                if (!PreProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[3], __eventData[2], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 6;

            case 6:
                System.Diagnostics.EventLog.WriteEntry("AnnoyingTord3", "Hello Tord! Incoming message... Scanning.. Receiving operation connection to " + "data base.. MESSAGE RECEIVE!");
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[4], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 8;

            case 8:
                System.Diagnostics.EventLog.WriteEntry("AnnoyingTord3", "Just an update Tord! Message successfully Transformed");
                if (!PostProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 9;

            case 9:
                System.Diagnostics.EventLog.WriteEntry("AnnoyingTord3", "Finally Tord! Message sent to external system");
                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[6], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 11;

            case 11:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                SendPort.SendMessage(0, __ctx1__.__msgInput, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (SendPort != null)
                {
                    SendPort.Close(__ctx1__, __seg__);
                    SendPort = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingRqst);
                }
                goto case 13;

            case 13:
                if (!PreProgressInc(__seg__, __ctx__, 14))
                {
                    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__.__msgInput);
                    __edata.PortName = @"SendPort";
                    Tracker.FireEvent(__eventLocations[7], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__msgInput != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgInput);
                    __ctx1__.__msgInput = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 14;

            case 14:
                if (!PreProgressInc(__seg__, __ctx__, 15))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[5], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 15;

            case 15:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 16))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 16;

            case 16:
                if (!PreProgressInc(__seg__, __ctx__, 17))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 17;

            case 17:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
        public Microsoft.XLANGs.Core.StopConditions segment2(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[2];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[2];
            __CreateGuard_1 __ctx1__ = (__CreateGuard_1)_stateMgrs[1];
            ____scope35_2 __ctx2__ = (____scope35_2)_stateMgrs[2];
            ____scope36_3 __ctx3__ = (____scope36_3)_stateMgrs[3];

            switch (__seg__.Progress)
            {
            case 0:
                __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[8],__eventData[2],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 2;
            case 2:
                {
                    __messagetype_System_Xml_XmlDocument __Context = new __messagetype_System_Xml_XmlDocument("Context", __ctx1__);
                    IGuardService_CreateGuard_InputMessage __CreateGuardRequest = new IGuardService_CreateGuard_InputMessage("CreateGuardRequest", __ctx1__);

                    ApplyTransform(typeof(MedegaImport.MapCreateGuardRequest), new object[] {__CreateGuardRequest.parameters}, new object[] {__ctx1__.__CreateGuardNodeMsg.part});
                    __Context.part.CopyFrom(__CreateGuardRequest.parameters);
                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = __CreateGuardRequest.parameters.TypedValue;

                    if (__ctx1__.__Context != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = __Context;
                    __ctx1__.RefMessage(__ctx1__.__Context);
                    if (__ctx1__.__CreateGuardRequest != null)
                        __ctx1__.UnrefMessage(__ctx1__.__CreateGuardRequest);
                    __ctx1__.__CreateGuardRequest = __CreateGuardRequest;
                    __ctx1__.RefMessage(__ctx1__.__CreateGuardRequest);
                }
                __ctx1__.__Context.ConstructionCompleteEvent(true);
                __ctx1__.__CreateGuardRequest.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 3 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 3;
            case 3:
                if ( !PreProgressInc( __seg__, __ctx__, 4 ) )
                    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__.__Context);
                    __edata.Messages.Add(__ctx1__.__CreateGuardRequest);
                    __edata.Messages.Add(__ctx1__.__CreateGuardNodeMsg);
                    Tracker.FireEvent(__eventLocations[9],__edata,_stateMgrs[2].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 4;
            case 4:
                if ( !PreProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[10],__eventData[3],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                __ctx3__ = new ____scope36_3(this);
                _stateMgrs[3] = __ctx3__;
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx2__.StartContext(__seg__, __ctx3__);
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null && __ctx1__.__CreateGuardRequest != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__CreateGuardRequest);
                    __ctx1__.__CreateGuardRequest = null;
                }
                Tracker.FireEvent(__eventLocations[23],__eventData[10],_stateMgrs[2].TrackDataStream );
                __ctx3__.Finally();
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                if (!__ctx2__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx2__.OnCommit();
                goto case 10;
            case 10:
                __seg__.SegmentDone();
                _segments[1].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #9
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];
            __ProcessNAVOrder_root_0       __ctx0__   = (__ProcessNAVOrder_root_0)_stateMgrs[0];
            __ProcessNAVOrder_1            __ctx1__   = (__ProcessNAVOrder_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!NAVOrderRP.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__NAVOrder != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__NAVOrder);
                }
                __ctx1__.__NAVOrder = new __messagetype_qbq_windeln_edi_NAVconnect_Fulfillment("NAVOrder", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__NAVOrder);
                NAVOrderRP.ReceiveMessage(0, __msgEnv__, __ctx1__.__NAVOrder, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (NAVOrderRP != null)
                {
                    NAVOrderRP.Close(__ctx1__, __seg__);
                    NAVOrderRP = 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__.__NAVOrder);
                    __edata.PortName = @"NAVOrderRP";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                if (!PreProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[3], __eventData[2], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 6;

            case 6:
            {
                __messagetype_qbq_windeln_edi_EFACT_D96A_ORDERS __EDIOrder = new __messagetype_qbq_windeln_edi_EFACT_D96A_ORDERS("EDIOrder", __ctx1__);

                ApplyTransform(typeof(qbq.windeln.edi.NAVPurchaseOrder_To_EDIOrdersD96A), new object[] { __EDIOrder.part }, new object[] { __ctx1__.__NAVOrder.part });

                if (__ctx1__.__EDIOrder != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__EDIOrder);
                }
                __ctx1__.__EDIOrder = __EDIOrder;
                __ctx1__.RefMessage(__ctx1__.__EDIOrder);
            }
                __ctx1__.__EDIOrder.ConstructionCompleteEvent(true);
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    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__.__EDIOrder);
                    __edata.Messages.Add(__ctx1__.__NAVOrder);
                    Tracker.FireEvent(__eventLocations[4], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__NAVOrder != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__NAVOrder);
                    __ctx1__.__NAVOrder = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                EDIOrderSP.SendMessage(0, __ctx1__.__EDIOrder, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (EDIOrderSP != null)
                {
                    EDIOrderSP.Close(__ctx1__, __seg__);
                    EDIOrderSP = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingRqst);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    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__.__EDIOrder);
                    __edata.PortName = @"EDIOrderSP";
                    Tracker.FireEvent(__eventLocations[6], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__EDIOrder != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__EDIOrder);
                    __ctx1__.__EDIOrder = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 12;

            case 12:
                if (!PreProgressInc(__seg__, __ctx__, 13))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[7], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 13;

            case 13:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 14))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 14;

            case 14:
                if (!PreProgressInc(__seg__, __ctx__, 15))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 15;

            case 15:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
Beispiel #10
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];
            __BizTalk_Orchestration1_root_0 __ctx0__   = (__BizTalk_Orchestration1_root_0)_stateMgrs[0];
            __BizTalk_Orchestration1_1      __ctx1__   = (__BizTalk_Orchestration1_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__VarXmldoc      = new Microsoft.XLANGs.RuntimeTypes.XmlDocumentSerializationProxy();
                __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 (!Port_1.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__Billing != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Billing);
                }
                __ctx1__.__Billing = new __messagetype_Typed_messages_BillingAddress("Billing", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__Billing);
                Port_1.ReceiveMessage(0, __msgEnv__, __ctx1__.__Billing, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (Port_1 != null)
                {
                    Port_1.Close(__ctx1__, __seg__);
                    Port_1 = 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__.__Billing);
                    __edata.PortName = @"Port_1";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                __ctx1__.__VarXmldoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                if (!PostProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 6;

            case 6:
                if (!PreProgressInc(__seg__, __ctx__, 7))
                {
                    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 7;

            case 7:
            {
                __messagetype_Typed_messages_ShippingAddress __Shipping = new __messagetype_Typed_messages_ShippingAddress("Shipping", __ctx1__);

                __ctx1__.__VarXmldoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                __ctx1__.__VarXmldoc.UnderlyingXmlDocument.LoadXml(@"<ns0:Root xmlns:ns0=""http://Typed_messages.BillingAddress""> <Address1>Address1</Address1><State>State</State><City>City</City><Country>Country</Country></ns0:Root>");
                __Shipping.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__VarXmldoc.UnderlyingXmlDocument);
                if (__ctx1__ != null)
                {
                    __ctx1__.__VarXmldoc = null;
                }
                __Shipping.part.SetDistinguishedField("Address1", (System.String)__ctx1__.__Billing.part.GetDistinguishedField("Address1"));
                __Shipping.part.SetDistinguishedField("City", (System.String)__ctx1__.__Billing.part.GetDistinguishedField("City"));
                __Shipping.part.SetDistinguishedField("Country", (System.String)__ctx1__.__Billing.part.GetDistinguishedField("Country"));
                __Shipping.part.SetDistinguishedField("State", (System.String)__ctx1__.__Billing.part.GetDistinguishedField("State"));
                if (__ctx1__ != null && __ctx1__.__Billing != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Billing);
                    __ctx1__.__Billing = null;
                }

                if (__ctx1__.__Shipping != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Shipping);
                }
                __ctx1__.__Shipping = __Shipping;
                __ctx1__.RefMessage(__ctx1__.__Shipping);
            }
                __ctx1__.__Shipping.ConstructionCompleteEvent(false);
                if (!PostProgressInc(__seg__, __ctx__, 8))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    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__.__Shipping);
                    Tracker.FireEvent(__eventLocations[5], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!PreProgressInc(__seg__, __ctx__, 10))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[6], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 10;

            case 10:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 11))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Port_2.SendMessage(0, __ctx1__.__Shipping, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (Port_2 != null)
                {
                    Port_2.Close(__ctx1__, __seg__);
                    Port_2 = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingRqst);
                }
                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.Send);
                    __edata.Messages.Add(__ctx1__.__Shipping);
                    __edata.PortName = @"Port_2";
                    Tracker.FireEvent(__eventLocations[7], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__Shipping != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Shipping);
                    __ctx1__.__Shipping = null;
                }
                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[3], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 14;

            case 14:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                __ctx1__.OnCommit();
                goto case 16;

            case 16:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
        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];
            ____scope33_2 __ctx2__ = (____scope33_2)_stateMgrs[2];
            __Sample1Orchestration_1 __ctx1__ = (__Sample1Orchestration_1)_stateMgrs[1];
            __Sample1Orchestration_root_0 __ctx0__ = (__Sample1Orchestration_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__SSISApp = default(Microsoft.SqlServer.Dts.Runtime.Application);
                __ctx1__.__SSISPkg = default(Microsoft.SqlServer.Dts.Runtime.Package);
                __ctx1__.__SSISVar = default(Microsoft.SqlServer.Dts.Runtime.Variable);
                __ctx1__.__Sample1Message = null;
                __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 (!Sample1Port.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__Sample1Message != null)
                    __ctx1__.UnrefMessage(__ctx1__.__Sample1Message);
                __ctx1__.__Sample1Message = new __messagetype_Sample1_SalesSchema("Sample1Message", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__Sample1Message);
                Sample1Port.ReceiveMessage(0, __msgEnv__, __ctx1__.__Sample1Message, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                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__.__Sample1Message);
                    __edata.PortName = @"Sample1Port";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                __ctx1__.__SSISApp = new Microsoft.SqlServer.Dts.Runtime.Application();
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx1__.__SSISPkg = new Microsoft.SqlServer.Dts.Runtime.Package();
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    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 8;
            case 8:
                __ctx2__ = new ____scope33_2(this);
                _stateMgrs[2] = __ctx2__;
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                __ctx1__.StartContext(__seg__, __ctx2__);
                if ( !PostProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 10:
                if ( !PreProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[9],__eventData[5],_stateMgrs[1].TrackDataStream );
                __ctx2__.Finally();
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 11;
            case 11:
                if ( !PreProgressInc( __seg__, __ctx__, 12 ) )
                    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 12;
            case 12:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 13;
            case 13:
                if ( !PreProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 14;
            case 14:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #12
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];
            __Simple_SMTP_1      __ctx1__             = (__Simple_SMTP_1)_stateMgrs[1];
            __Simple_SMTP_root_0 __ctx0__             = (__Simple_SMTP_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__xmlDoc         = new Microsoft.XLANGs.RuntimeTypes.XmlDocumentSerializationProxy();
                __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 (!Rcv.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__IN_msg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__IN_msg);
                }
                __ctx1__.__IN_msg = new __messagetype_SMTP_Test_PO_Schema("IN_msg", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__IN_msg);
                Rcv.ReceiveMessage(0, __msgEnv__, __ctx1__.__IN_msg, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (Rcv != null)
                {
                    Rcv.Close(__ctx1__, __seg__);
                    Rcv = 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__.__IN_msg);
                    __edata.PortName = @"Rcv";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                __ctx1__.__xmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                if (!PostProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 6;

            case 6:
                if (!PreProgressInc(__seg__, __ctx__, 7))
                {
                    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 7;

            case 7:
            {
                __messagetype_SMTP_Test_PO_Schema __Out_msg = new __messagetype_SMTP_Test_PO_Schema("Out_msg", __ctx1__);

                __Out_msg.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__xmlDoc.UnderlyingXmlDocument);
                if (__ctx1__ != null)
                {
                    __ctx1__.__xmlDoc = null;
                }
                __Out_msg.SetPropertyValue(typeof(SMTP.From), "*****@*****.**");
                __Out_msg.SetPropertyValue(typeof(SMTP.EmailBodyText), "This email contains po number of order" + (System.String)__ctx1__.__IN_msg.part.GetDistinguishedField("PO_No"));
                if (__ctx1__ != null && __ctx1__.__IN_msg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__IN_msg);
                    __ctx1__.__IN_msg = null;
                }

                if (__ctx1__.__Out_msg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Out_msg);
                }
                __ctx1__.__Out_msg = __Out_msg;
                __ctx1__.RefMessage(__ctx1__.__Out_msg);
            }
                __ctx1__.__Out_msg.ConstructionCompleteEvent(false);
                if (!PostProgressInc(__seg__, __ctx__, 8))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    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__.__Out_msg);
                    Tracker.FireEvent(__eventLocations[5], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!PreProgressInc(__seg__, __ctx__, 10))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[6], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 10;

            case 10:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 11))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Send.SendMessage(0, __ctx1__.__Out_msg, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (Send != null)
                {
                    Send.Close(__ctx1__, __seg__);
                    Send = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingRqst);
                }
                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.Send);
                    __edata.Messages.Add(__ctx1__.__Out_msg);
                    __edata.PortName = @"Send";
                    Tracker.FireEvent(__eventLocations[7], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__Out_msg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Out_msg);
                    __ctx1__.__Out_msg = null;
                }
                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[3], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 14;

            case 14:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                __ctx1__.OnCommit();
                goto case 16;

            case 16:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
Beispiel #13
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];
            __CustomizeFileNameOrc_root_0  __ctx0__   = (__CustomizeFileNameOrc_root_0)_stateMgrs[0];
            __CustomizeFileNameOrc_1       __ctx1__   = (__CustomizeFileNameOrc_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!Port_1.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__msgInput != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgInput);
                }
                __ctx1__.__msgInput = new __messagetype_System_Xml_XmlDocument("msgInput", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__msgInput);
                Port_1.ReceiveMessage(0, __msgEnv__, __ctx1__.__msgInput, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (Port_1 != null)
                {
                    Port_1.Close(__ctx1__, __seg__);
                    Port_1 = 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__.__msgInput);
                    __edata.PortName = @"Port_1";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                if (!PreProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[3], __eventData[2], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 6;

            case 6:
            {
                __messagetype_System_Xml_XmlDocument __msgOutput = new __messagetype_System_Xml_XmlDocument("msgOutput", __ctx1__);

                __msgOutput.CopyFrom(__ctx1__.__msgInput);
                RootService.CommitStateManager.UserCodeCalled = true;
                __msgOutput.SetPropertyValue(typeof(FILE.ReceivedFileName), "out_" + (System.String)__ctx1__.__msgInput.GetPropertyValueThrows(typeof(FILE.ReceivedFileName)));
                RootService.CommitStateManager.UserCodeCalled = true;
                if (__ctx1__ != null && __ctx1__.__msgInput != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgInput);
                    __ctx1__.__msgInput = null;
                }

                if (__ctx1__.__msgOutput != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgOutput);
                }
                __ctx1__.__msgOutput = __msgOutput;
                __ctx1__.RefMessage(__ctx1__.__msgOutput);
            }
                __ctx1__.__msgOutput.ConstructionCompleteEvent(false);
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    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__.__msgOutput);
                    Tracker.FireEvent(__eventLocations[4], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                Port_2.SendMessage(0, __ctx1__.__msgOutput, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (Port_2 != null)
                {
                    Port_2.Close(__ctx1__, __seg__);
                    Port_2 = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingRqst);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    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__.__msgOutput);
                    __edata.PortName = @"Port_2";
                    Tracker.FireEvent(__eventLocations[6], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__msgOutput != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgOutput);
                    __ctx1__.__msgOutput = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 12;

            case 12:
                if (!PreProgressInc(__seg__, __ctx__, 13))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[7], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 13;

            case 13:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 14))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 14;

            case 14:
                if (!PreProgressInc(__seg__, __ctx__, 15))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 15;

            case 15:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
        public Microsoft.XLANGs.Core.StopConditions segment6(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            bool __condition__;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[6];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[2];
            __subImportGuardRecord_1 __ctx1__ = (__subImportGuardRecord_1)_stateMgrs[1];
            __Transaction_2_2 __ctx2__ = (__Transaction_2_2)_stateMgrs[2];

            switch (__seg__.Progress)
            {
            case 0:
                OnBeginCatchHandler(2);
                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[33],__eventData[6],_stateMgrs[2].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[34],__eventData[2],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 3;
            case 3:
                __ctx2__.__ExceptionDescription = __ctx2__.__ex_0.Message;
                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;
                Tracker.FireEvent(__eventLocations[35],__eventData[3],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                __ctx2__.__TechnicalErrorOccured = true;
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx2__.__InnerExceptionDescription = "";
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[36],__eventData[9],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                __condition__ = __ctx2__.__ex_0.InnerException != null;
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 11;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                __ctx2__.__InnerExceptionDescription = __ctx2__.__ex_0.InnerException.Message;
                if ( !PostProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 10;
            case 10:
                if ( !PostProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 12;
            case 11:
                __ctx2__.__InnerExceptionDescription = "";
                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;
                if (__ctx2__ != null)
                    __ctx2__.__ex_0 = null;
                Tracker.FireEvent(__eventLocations[37],__eventData[11],_stateMgrs[2].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[38],__eventData[12],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 14;
            case 14:
                {
                    Microsoft.XLANGs.Core.Service svc = new MedegaImport.HandleException(5, InstanceId, this);
                    _stateMgrs[5] = svc;
                    __ctx2__.StartCall(__seg__, svc, __eventLocations[38],new object[] {__ctx2__.__returnCode, __ctx1__.__Context, __ctx2__.__ExceptionMsg, __ctx2__.__ExceptionDescription, __ctx2__.__InnerExceptionDescription});
                }
                if ( !PostProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 15:
                if ( !PreProgressInc( __seg__, __ctx__, 16 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    object[] args = ((Microsoft.XLANGs.Core.Service)_stateMgrs[5]).Args;
                    __ctx2__.__returnCode = (System.Int32)args[0];
                }
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Call);
                    __edata.Messages.Add(__ctx1__.__Context);
                    __edata.Messages.Add(__ctx2__.__ExceptionMsg);
                    Tracker.FireEvent(__eventLocations[39],__edata,_stateMgrs[2].TrackDataStream );
                }
                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[40],__eventData[7],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 17;
            case 17:
                __ctx2__.__exv__ = null;
                OnEndCatchHandler(2, __seg__);
                __seg__.SegmentDone();
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #15
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];
            __BizTalk_Orchestration1_1      __ctx1__   = (__BizTalk_Orchestration1_1)_stateMgrs[1];
            __BizTalk_Orchestration1_root_0 __ctx0__   = (__BizTalk_Orchestration1_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__Variable_1     = new Microsoft.XLANGs.RuntimeTypes.XmlDocumentSerializationProxy();
                __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 (!Port_1.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__Message_1 != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Message_1);
                }
                __ctx1__.__Message_1 = new __messagetype_Microsoft_XLANGs_BaseTypes_Any("Message_1", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__Message_1);
                Port_1.ReceiveMessage(0, __msgEnv__, __ctx1__.__Message_1, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                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__.__Message_1);
                    __edata.PortName = @"Port_1";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__Message_1 != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Message_1);
                    __ctx1__.__Message_1 = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                __ctx1__.__Variable_1.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                if (!PostProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 6;

            case 6:
                if (!PreProgressInc(__seg__, __ctx__, 7))
                {
                    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 7;

            case 7:
            {
                __messagetype_Microsoft_XLANGs_BaseTypes_Any __Message_2 = new __messagetype_Microsoft_XLANGs_BaseTypes_Any("Message_2", __ctx1__);

                __ctx1__.__Variable_1.UnderlyingXmlDocument.LoadXml("<testRes>hey Whats up !</<testRes>");
                __Message_2.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__Variable_1.UnderlyingXmlDocument);
                if (__ctx1__ != null)
                {
                    __ctx1__.__Variable_1 = null;
                }

                if (__ctx1__.__Message_2 != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Message_2);
                }
                __ctx1__.__Message_2 = __Message_2;
                __ctx1__.RefMessage(__ctx1__.__Message_2);
            }
                __ctx1__.__Message_2.ConstructionCompleteEvent(false);
                if (!PostProgressInc(__seg__, __ctx__, 8))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    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__.__Message_2);
                    Tracker.FireEvent(__eventLocations[5], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!PreProgressInc(__seg__, __ctx__, 10))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[6], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 10;

            case 10:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 11))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Port_1.SendMessage(0, __ctx1__.__Message_2, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (Port_1 != null)
                {
                    Port_1.Close(__ctx1__, __seg__);
                    Port_1 = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingResp) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingResp);
                }
                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.Send);
                    __edata.Messages.Add(__ctx1__.__Message_2);
                    __edata.PortName = @"Port_1";
                    Tracker.FireEvent(__eventLocations[7], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__Message_2 != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Message_2);
                    __ctx1__.__Message_2 = null;
                }
                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[3], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 14;

            case 14:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                __ctx1__.OnCommit();
                goto case 16;

            case 16:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
        public Microsoft.XLANGs.Core.StopConditions segment2(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Envelope __msgEnv__ = null;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[2];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[2];
            ____scope41_2 __ctx2__ = (____scope41_2)_stateMgrs[2];
            __subUpdateNodeStatus_root_0 __ctx0__ = (__subUpdateNodeStatus_root_0)_stateMgrs[0];
            __subUpdateNodeStatus_1 __ctx1__ = (__subUpdateNodeStatus_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __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[6],__eventData[2],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 2;
            case 2:
                {
                    __messagetype_System_Xml_XmlDocument __Context = new __messagetype_System_Xml_XmlDocument("Context", __ctx1__);
                    UpdateNodeStatusRequest __SQLUpdateNodeStatusRequest = new UpdateNodeStatusRequest("SQLUpdateNodeStatusRequest", __ctx1__);

                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                    __ctx1__.__tempString = System.String.Format("<ns0:UpdateNodeStatusRequest xmlns:ns0=\"http://inami-riziv.fgov.be.medega\"><ns0:sp_UpdateMedegaXmlNodeStatus NodeId=\"{0}\" NodeStatus=\"{1}\" ReasonOfFailure=\"{2}\" /></ns0:UpdateNodeStatusRequest>", __ctx1__.__NodeId, __ctx1__.__StatusId, __ctx1__.__ReasonOfFailure);
                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument.LoadXml(__ctx1__.__tempString);
                    __SQLUpdateNodeStatusRequest.parameters.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);
                    __Context.part.CopyFrom(__SQLUpdateNodeStatusRequest.parameters);

                    if (__ctx1__.__Context != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = __Context;
                    __ctx1__.RefMessage(__ctx1__.__Context);
                    if (__ctx1__.__SQLUpdateNodeStatusRequest != null)
                        __ctx1__.UnrefMessage(__ctx1__.__SQLUpdateNodeStatusRequest);
                    __ctx1__.__SQLUpdateNodeStatusRequest = __SQLUpdateNodeStatusRequest;
                    __ctx1__.RefMessage(__ctx1__.__SQLUpdateNodeStatusRequest);
                }
                __ctx1__.__Context.ConstructionCompleteEvent(false);
                __ctx1__.__SQLUpdateNodeStatusRequest.ConstructionCompleteEvent(false);
                if ( !PostProgressInc( __seg__, __ctx__, 3 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 3;
            case 3:
                if ( !PreProgressInc( __seg__, __ctx__, 4 ) )
                    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__.__Context);
                    __edata.Messages.Add(__ctx1__.__SQLUpdateNodeStatusRequest);
                    Tracker.FireEvent(__eventLocations[7],__edata,_stateMgrs[2].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 4;
            case 4:
                if ( !PreProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[8],__eventData[4],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if (!__ctx2__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                if ( !PreProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                SQLUpdateNodeStatusPort.SendMessage(0, __ctx1__.__SQLUpdateNodeStatusRequest, null, null, out __ctx0__.__subWrapper0, __ctx2__, __seg__ );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    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__.__SQLUpdateNodeStatusRequest);
                    __edata.PortName = @"SQLUpdateNodeStatusPort";
                    Tracker.FireEvent(__eventLocations[9],__edata,_stateMgrs[2].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__SQLUpdateNodeStatusRequest != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__SQLUpdateNodeStatusRequest);
                    __ctx1__.__SQLUpdateNodeStatusRequest = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                if ( !PreProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[10],__eventData[5],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 9;
            case 9:
                if (!SQLUpdateNodeStatusPort.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__, _locations[0]))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx0__ != null && __ctx0__.__subWrapper0 != null)
                {
                    __ctx0__.__subWrapper0.Destroy(this, __ctx0__);
                    __ctx0__.__subWrapper0 = null;
                }
                if (__ctx1__.__SQLUpdateNodeStatusResponse != null)
                    __ctx1__.UnrefMessage(__ctx1__.__SQLUpdateNodeStatusResponse);
                __ctx1__.__SQLUpdateNodeStatusResponse = new UpdateNodeStatusResponse("SQLUpdateNodeStatusResponse", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__SQLUpdateNodeStatusResponse);
                SQLUpdateNodeStatusPort.ReceiveMessage(0, __msgEnv__, __ctx1__.__SQLUpdateNodeStatusResponse, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[2], __seg__);
                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;
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Receive);
                    __edata.Messages.Add(__ctx1__.__SQLUpdateNodeStatusResponse);
                    __edata.PortName = @"SQLUpdateNodeStatusPort";
                    Tracker.FireEvent(__eventLocations[11],__edata,_stateMgrs[2].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__SQLUpdateNodeStatusResponse != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__SQLUpdateNodeStatusResponse);
                    __ctx1__.__SQLUpdateNodeStatusResponse = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 11;
            case 11:
                if (!__ctx2__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                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;
                __ctx2__.OnCommit();
                goto case 13;
            case 13:
                __seg__.SegmentDone();
                _segments[1].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #17
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];
            __QuoteService_root_0 __ctx0__ = (__QuoteService_root_0)_stateMgrs[0];
            __QuoteService_1 __ctx1__ = (__QuoteService_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!Port_1.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__msgQuote != null)
                    __ctx1__.UnrefMessage(__ctx1__.__msgQuote);
                __ctx1__.__msgQuote = new __messagetype_StockQuoteService_StockQuote("msgQuote", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__msgQuote);
                Port_1.ReceiveMessage(0, __msgEnv__, __ctx1__.__msgQuote, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                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__.__msgQuote);
                    __edata.PortName = @"Port_1";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[3],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                {
                    __messagetype_StockQuoteService_StockQuote __msgResponse = new __messagetype_StockQuoteService_StockQuote("msgResponse", __ctx1__);

                    __msgResponse.CopyFrom(__ctx1__.__msgQuote);
                    RootService.CommitStateManager.UserCodeCalled = true;
                    __msgResponse.CopyContextPropertiesFrom(__ctx1__.__msgQuote);
                    RootService.CommitStateManager.UserCodeCalled = true;
                    if (__ctx1__ != null && __ctx1__.__msgQuote != null)
                    {
                        __ctx1__.UnrefMessage(__ctx1__.__msgQuote);
                        __ctx1__.__msgQuote = null;
                    }
                    __msgResponse.part.SetDistinguishedField("LastPrice", "29.29");
                    RootService.CommitStateManager.UserCodeCalled = true;

                    if (__ctx1__.__msgResponse != null)
                        __ctx1__.UnrefMessage(__ctx1__.__msgResponse);
                    __ctx1__.__msgResponse = __msgResponse;
                    __ctx1__.RefMessage(__ctx1__.__msgResponse);
                }
                __ctx1__.__msgResponse.ConstructionCompleteEvent(false);
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    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__.__msgResponse);
                    Tracker.FireEvent(__eventLocations[4],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                if ( !PreProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[5],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 9;
            case 9:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                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;
                Port_1.SendMessage(0, __ctx1__.__msgResponse, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists );
                if (Port_1 != null)
                {
                    Port_1.Close(__ctx1__, __seg__);
                    Port_1 = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingResp) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingResp;
                goto case 11;
            case 11:
                if ( !PreProgressInc( __seg__, __ctx__, 12 ) )
                    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__.__msgResponse);
                    __edata.PortName = @"Port_1";
                    Tracker.FireEvent(__eventLocations[6],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__msgResponse != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgResponse);
                    __ctx1__.__msgResponse = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 12;
            case 12:
                if ( !PreProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[7],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 13;
            case 13:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 14;
            case 14:
                if ( !PreProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 15;
            case 15:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
        public Microsoft.XLANGs.Core.StopConditions segment5(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            bool __condition__;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[5];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[2];
            __CreateGuard_1 __ctx1__ = (__CreateGuard_1)_stateMgrs[1];
            ____scope35_2 __ctx2__ = (____scope35_2)_stateMgrs[2];

            switch (__seg__.Progress)
            {
            case 0:
                OnBeginCatchHandler(2);
                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[24],__eventData[5],_stateMgrs[2].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[25],__eventData[6],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 3;
            case 3:
                __ctx1__.__NodeId = (System.Int64)__ctx1__.__CreateGuardNodeMsg.part.GetDistinguishedField("NodeId");
                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;
                Tracker.FireEvent(__eventLocations[26],__eventData[7],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                __ctx1__.__StatusId = System.Convert.ToInt32(MedegaImport.MedegaImportTypes.MedegaNodeStatus.InError);
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx1__.__ReasonOfFailure = __ctx2__.__exc_0.Message;
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                __ctx1__.__ExceptionDescription = __ctx2__.__exc_0.Message;
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                __ctx1__.__InnerExceptionDescription = "";
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[27],__eventData[11],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 10;
            case 10:
                __condition__ = __ctx2__.__exc_0.InnerException != null;
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 12 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 12;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 11:
                __ctx1__.__InnerExceptionDescription = __ctx2__.__exc_0.InnerException.Message;
                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;
                if (__ctx2__ != null)
                    __ctx2__.__exc_0 = null;
                Tracker.FireEvent(__eventLocations[28],__eventData[12],_stateMgrs[2].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[29],__eventData[13],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 14;
            case 14:
                {
                    Microsoft.XLANGs.Core.Service svc = new MedegaImport.HandleException(4, InstanceId, this);
                    _stateMgrs[4] = svc;
                    __ctx2__.StartCall(__seg__, svc, __eventLocations[29],new object[] {__ctx1__.__returnCode, __ctx1__.__Context, __ctx1__.__Context, __ctx1__.__ExceptionDescription, __ctx1__.__InnerExceptionDescription});
                }
                if ( !PostProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 15:
                if ( !PreProgressInc( __seg__, __ctx__, 16 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    object[] args = ((Microsoft.XLANGs.Core.Service)_stateMgrs[4]).Args;
                    __ctx1__.__returnCode = (System.Int32)args[0];
                }
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Call);
                    __edata.Messages.Add(__ctx1__.__Context);
                    __edata.Messages.Add(__ctx1__.__Context);
                    Tracker.FireEvent(__eventLocations[30],__edata,_stateMgrs[2].TrackDataStream );
                }
                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[31],__eventData[13],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 17;
            case 17:
                {
                    Microsoft.XLANGs.Core.Service svc = new MedegaImport.subUpdateNodeStatus(5, InstanceId, this);
                    _stateMgrs[5] = svc;
                    __ctx2__.StartCall(__seg__, svc, __eventLocations[31],new object[] {__ctx1__.__NodeId, __ctx1__.__StatusId, __ctx1__.__ReasonOfFailure});
                }
                if ( !PostProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 18:
                if ( !PreProgressInc( __seg__, __ctx__, 19 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    object[] args = ((Microsoft.XLANGs.Core.Service)_stateMgrs[5]).Args;
                }
                Tracker.FireEvent(__eventLocations[32],__eventData[14],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 19;
            case 19:
                if ( !PreProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[33],__eventData[9],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 20;
            case 20:
                __ctx2__.__exv__ = null;
                OnEndCatchHandler(2, __seg__);
                __seg__.SegmentDone();
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #19
0
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Envelope __msgEnv__ = null;
            bool __condition__;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[1];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __LeaveMainOrch_root_0 __ctx0__ = (__LeaveMainOrch_root_0)_stateMgrs[0];
            __LeaveMainOrch_1 __ctx1__ = (__LeaveMainOrch_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __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;
                __ctx1__.__subWrapper1 = new Microsoft.XLANGs.Core.SubscriptionWrapper(1, System.Guid.Empty, ResponseFromHR, 0, __ctx0__);
                __ctx1__.__Correlation_1 = new Microsoft.XLANGs.Core.Correlation(this, 0, 1);
                __ctx1__.__Correlation_1.AddSubscription(((__LeaveMainOrch_1)_stateMgrs[1]).__subWrapper1.getSubscription(this), __ctx1__);
                Tracker.FireEvent(__eventLocations[1],__eventData[1],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 3;
            case 3:
                if (!LeaveRequestRecvPort.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__MsgLeaveRequest != null)
                    __ctx1__.UnrefMessage(__ctx1__.__MsgLeaveRequest);
                __ctx1__.__MsgLeaveRequest = new __messagetype_LeaveProject_LeaveRequestSchema("MsgLeaveRequest", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__MsgLeaveRequest);
                LeaveRequestRecvPort.ReceiveMessage(0, __msgEnv__, __ctx1__.__MsgLeaveRequest, new Microsoft.XLANGs.Core.Correlation[] { __ctx1__.__Correlation_1 }, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (LeaveRequestRecvPort != null)
                {
                    LeaveRequestRecvPort.Close(__ctx1__, __seg__);
                    LeaveRequestRecvPort = 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__.__MsgLeaveRequest);
                    __edata.PortName = @"LeaveRequestRecvPort";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[3],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                __condition__ = (System.Int32)__ctx1__.__MsgLeaveRequest.part.GetDistinguishedField("Details.NoOfDays") > 21;
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 15 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 15;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[4],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                {
                    __messagetype_LeaveProject_LeaveResponseSchema __MsgLeaveResponse = new __messagetype_LeaveProject_LeaveResponseSchema("MsgLeaveResponse", __ctx1__);

                    ApplyTransform(typeof(LeaveProject.LeaveRequestToResponse), new object[] {__MsgLeaveResponse.part}, new object[] {__ctx1__.__MsgLeaveRequest.part});

                    if (__ctx1__.__MsgLeaveResponse != null)
                        __ctx1__.UnrefMessage(__ctx1__.__MsgLeaveResponse);
                    __ctx1__.__MsgLeaveResponse = __MsgLeaveResponse;
                    __ctx1__.RefMessage(__ctx1__.__MsgLeaveResponse);
                }
                __ctx1__.__MsgLeaveResponse.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    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__.__MsgLeaveResponse);
                    __edata.Messages.Add(__ctx1__.__MsgLeaveRequest);
                    Tracker.FireEvent(__eventLocations[5],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 10;
            case 10:
                if ( !PreProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[6],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 11;
            case 11:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                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;
                LeaveAcceptSendPort.SendMessage(0, __ctx1__.__MsgLeaveResponse, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 13;
            case 13:
                if ( !PreProgressInc( __seg__, __ctx__, 14 ) )
                    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__.__MsgLeaveResponse);
                    __edata.PortName = @"LeaveAcceptSendPort";
                    Tracker.FireEvent(__eventLocations[7],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__MsgLeaveResponse != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__MsgLeaveResponse);
                    __ctx1__.__MsgLeaveResponse = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 14;
            case 14:
                if ( !PostProgressInc( __seg__, __ctx__, 26 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 26;
            case 15:
                if ( !PreProgressInc( __seg__, __ctx__, 16 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[8],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 16;
            case 16:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 17;
            case 17:
                if ( !PreProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                LeaveRequestToHRPort.SendMessage(0, __ctx1__.__MsgLeaveRequest, null, new Microsoft.XLANGs.Core.Correlation[] { __ctx1__.__Correlation_1 }, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.None );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 18;
            case 18:
                if ( !PreProgressInc( __seg__, __ctx__, 19 ) )
                    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__.__MsgLeaveRequest);
                    __edata.PortName = @"LeaveRequestToHRPort";
                    Tracker.FireEvent(__eventLocations[9],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 19;
            case 19:
                if ( !PreProgressInc( __seg__, __ctx__, 20 ) )
                    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 20;
            case 20:
                if (!ResponseFromHR.GetMessageId(__ctx1__.__subWrapper1.getSubscription(this), __seg__, __ctx1__, out __msgEnv__, _locations[0]))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__MsgLeaveRequest != null)
                    __ctx1__.UnrefMessage(__ctx1__.__MsgLeaveRequest);
                __ctx1__.__MsgLeaveRequest = new __messagetype_LeaveProject_LeaveRequestSchema("MsgLeaveRequest", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__MsgLeaveRequest);
                ResponseFromHR.ReceiveMessage(0, __msgEnv__, __ctx1__.__MsgLeaveRequest, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if ( !PostProgressInc( __seg__, __ctx__, 21 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 21;
            case 21:
                if ( !PreProgressInc( __seg__, __ctx__, 22 ) )
                    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__.__MsgLeaveRequest);
                    __edata.PortName = @"ResponseFromHR";
                    Tracker.FireEvent(__eventLocations[11],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 22;
            case 22:
                if ( !PreProgressInc( __seg__, __ctx__, 23 ) )
                    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 23;
            case 23:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 24 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 24;
            case 24:
                if ( !PreProgressInc( __seg__, __ctx__, 25 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                SendToEmp.SendMessage(0, __ctx1__.__MsgLeaveRequest, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 25;
            case 25:
                if ( !PreProgressInc( __seg__, __ctx__, 26 ) )
                    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__.__MsgLeaveRequest);
                    __edata.PortName = @"SendToEmp";
                    Tracker.FireEvent(__eventLocations[13],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 26;
            case 26:
                if ( !PreProgressInc( __seg__, __ctx__, 27 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null && __ctx1__.__subWrapper1 != null)
                {
                    __ctx1__.__subWrapper1.Destroy(this, __ctx1__);
                    __ctx1__.__subWrapper1 = null;
                }
                if (__ctx1__ != null && __ctx1__.__Correlation_1 != null)
                    __ctx1__.__Correlation_1 = null;
                if (__ctx1__ != null && __ctx1__.__MsgLeaveRequest != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__MsgLeaveRequest);
                    __ctx1__.__MsgLeaveRequest = null;
                }
                if (SendToEmp != null)
                {
                    SendToEmp.Close(__ctx1__, __seg__);
                    SendToEmp = null;
                }
                if (ResponseFromHR != null)
                {
                    ResponseFromHR.Close(__ctx1__, __seg__);
                    ResponseFromHR = null;
                }
                if (LeaveRequestToHRPort != null)
                {
                    LeaveRequestToHRPort.Close(__ctx1__, __seg__);
                    LeaveRequestToHRPort = null;
                }
                if (LeaveAcceptSendPort != null)
                {
                    LeaveAcceptSendPort.Close(__ctx1__, __seg__);
                    LeaveAcceptSendPort = null;
                }
                Tracker.FireEvent(__eventLocations[14],__eventData[5],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 27;
            case 27:
                if ( !PreProgressInc( __seg__, __ctx__, 28 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[15],__eventData[6],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 28;
            case 28:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 29 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 29;
            case 29:
                if ( !PreProgressInc( __seg__, __ctx__, 30 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 30;
            case 30:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
        public Microsoft.XLANGs.Core.StopConditions segment2(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            bool __condition__;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[2];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[2];
            ____scope37_2 __ctx2__ = (____scope37_2)_stateMgrs[2];
            __subImportFile_1 __ctx1__ = (__subImportFile_1)_stateMgrs[1];
            ____scope38_3 __ctx3__ = (____scope38_3)_stateMgrs[3];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx2__.__xpathString = default(System.String);
                __ctx__.PrologueCompleted = true;
                if ( !PostProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 1;
            case 1:
                __ctx2__.__xpathString = "";
                if ( !PostProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 2;
            case 2:
                if ( !PreProgressInc( __seg__, __ctx__, 3 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[9],__eventData[6],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 3;
            case 3:
                __condition__ = (__ctx1__.__GuardsFile.GetPropertyValueNoThrow(typeof(FILE.ReceivedFileName)) != null);
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 6;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 4;
            case 4:
                __ctx1__.__receivedFileName = (System.String)__ctx1__.__GuardsFile.GetPropertyValueThrows(typeof(FILE.ReceivedFileName));
                if ( !PostProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 5;
            case 5:
                if ( !PostProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 12;
            case 6:
                if ( !PreProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[7],__eventData[6],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 7;
            case 7:
                __condition__ = (__ctx1__.__GuardsFile.GetPropertyValueNoThrow(typeof(FTP.ReceivedFileName)) != null);
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 10 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 10;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                __ctx1__.__receivedFileName = (System.String)__ctx1__.__GuardsFile.GetPropertyValueThrows(typeof(FTP.ReceivedFileName));
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 10:
                __ctx1__.__receivedFileName = "";
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 11:
                if ( !PreProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[8],__eventData[7],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 12;
            case 12:
                if ( !PreProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[10],__eventData[7],_stateMgrs[2].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[11],__eventData[2],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 14;
            case 14:
                {
                    __messagetype_System_Xml_XmlDocument __Context = new __messagetype_System_Xml_XmlDocument("Context", __ctx1__);
                    CreateMedegaFileRequest __SQLCreateMedegaFileRequest = new CreateMedegaFileRequest("SQLCreateMedegaFileRequest", __ctx1__);

                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                    __ctx1__.__status = System.Convert.ToInt32(MedegaImport.MedegaImportTypes.MedegaFileStatusEnum.ImportStarted);
                    __ctx1__.__tmpString = "<ns0:CreateMedegaFileRequest xmlns:ns0='http://inami-riziv.fgov.be.medega'><ns0:sp_BTSCreateMedegaFile FileName='" + __ctx1__.__receivedFileName + "' FileStatus='" + System.Convert.ToString(__ctx1__.__status) + "' /></ns0:CreateMedegaFileRequest>";
                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument.LoadXml(__ctx1__.__tmpString);
                    __SQLCreateMedegaFileRequest.parameters.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);
                    __Context.part.CopyFrom(__SQLCreateMedegaFileRequest.parameters);

                    if (__ctx1__.__Context != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = __Context;
                    __ctx1__.RefMessage(__ctx1__.__Context);
                    if (__ctx1__.__SQLCreateMedegaFileRequest != null)
                        __ctx1__.UnrefMessage(__ctx1__.__SQLCreateMedegaFileRequest);
                    __ctx1__.__SQLCreateMedegaFileRequest = __SQLCreateMedegaFileRequest;
                    __ctx1__.RefMessage(__ctx1__.__SQLCreateMedegaFileRequest);
                }
                __ctx1__.__Context.ConstructionCompleteEvent(false);
                __ctx1__.__SQLCreateMedegaFileRequest.ConstructionCompleteEvent(false);
                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__.__Context);
                    __edata.Messages.Add(__ctx1__.__SQLCreateMedegaFileRequest);
                    Tracker.FireEvent(__eventLocations[12],__edata,_stateMgrs[2].TrackDataStream );
                }
                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[13],__eventData[5],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 17;
            case 17:
                __ctx3__ = new ____scope38_3(this);
                _stateMgrs[3] = __ctx3__;
                if ( !PostProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 18;
            case 18:
                __ctx2__.StartContext(__seg__, __ctx3__);
                if ( !PostProgressInc( __seg__, __ctx__, 19 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 19:
                if ( !PreProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx2__ != null)
                    __ctx2__.__xpathString = null;
                if (__ctx1__ != null && __ctx1__.__SQLCreateMedegaFileRequest != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__SQLCreateMedegaFileRequest);
                    __ctx1__.__SQLCreateMedegaFileRequest = null;
                }
                Tracker.FireEvent(__eventLocations[29],__eventData[13],_stateMgrs[2].TrackDataStream );
                __ctx3__.Finally();
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 20;
            case 20:
                if (!__ctx2__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 21 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 21;
            case 21:
                if ( !PreProgressInc( __seg__, __ctx__, 22 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx2__.OnCommit();
                goto case 22;
            case 22:
                __seg__.SegmentDone();
                _segments[1].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #21
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];
            __HRSubOrch_1 __ctx1__ = (__HRSubOrch_1)_stateMgrs[1];
            __HRSubOrch_root_0 __ctx0__ = (__HRSubOrch_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!RecvFromEmpPort.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__MessageIn != null)
                    __ctx1__.UnrefMessage(__ctx1__.__MessageIn);
                __ctx1__.__MessageIn = new __messagetype_LeaveProject_LeaveRequestSchema("MessageIn", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__MessageIn);
                RecvFromEmpPort.ReceiveMessage(0, __msgEnv__, __ctx1__.__MessageIn, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (RecvFromEmpPort != null)
                {
                    RecvFromEmpPort.Close(__ctx1__, __seg__);
                    RecvFromEmpPort = 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__.__MessageIn);
                    __edata.PortName = @"RecvFromEmpPort";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[3],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                {
                    __messagetype_LeaveProject_LeaveRequestSchema __MessageOut = new __messagetype_LeaveProject_LeaveRequestSchema("MessageOut", __ctx1__);

                    __MessageOut.CopyFrom(__ctx1__.__MessageIn);
                    __MessageOut.part.SetDistinguishedField("Details.Reason", "Modified by HR Sub Orch");

                    if (__ctx1__.__MessageOut != null)
                        __ctx1__.UnrefMessage(__ctx1__.__MessageOut);
                    __ctx1__.__MessageOut = __MessageOut;
                    __ctx1__.RefMessage(__ctx1__.__MessageOut);
                }
                __ctx1__.__MessageOut.ConstructionCompleteEvent(false);
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    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__.__MessageOut);
                    Tracker.FireEvent(__eventLocations[4],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                if ( !PreProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[5],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 9;
            case 9:
                {
                    Microsoft.XLANGs.Core.Service svc = new LeaveProject.CalledOrch(2, InstanceId, this);
                    _stateMgrs[2] = svc;
                    __ctx1__.StartCall(__seg__, svc, __eventLocations[5],new object[] {__ctx1__.__MessageIn, new Microsoft.XLANGs.Core.MessageTuple((Microsoft.XLANGs.Core.Context)_stateMgrs[1], null)});
                }
                if ( !PostProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 10:
                {
                    object[] args = ((Microsoft.XLANGs.Core.Service)_stateMgrs[2]).Args;
                    __ctx1__.__MessageIn = (__messagetype_LeaveProject_LeaveRequestSchema)((Microsoft.XLANGs.Core.MessageTuple)(args[1])).message;
                    __ctx1__.__MessageIn.MessageName = "MessageIn";
                }
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Call);
                    __edata.Messages.Add(__ctx1__.__MessageIn);
                    __edata.Messages.Add(__ctx1__.__MessageIn);
                    Tracker.FireEvent(__eventLocations[6],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__MessageIn != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__MessageIn);
                    __ctx1__.__MessageIn = null;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 11:
                if ( !PreProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[7],__eventData[5],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 12;
            case 12:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 13;
            case 13:
                if ( !PreProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                SendToEmpPort.SendMessage(0, __ctx1__.__MessageOut, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists );
                if (SendToEmpPort != null)
                {
                    SendToEmpPort.Close(__ctx1__, __seg__);
                    SendToEmpPort = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 14;
            case 14:
                if ( !PreProgressInc( __seg__, __ctx__, 15 ) )
                    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__.__MessageOut);
                    __edata.PortName = @"SendToEmpPort";
                    Tracker.FireEvent(__eventLocations[8],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__MessageOut != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__MessageOut);
                    __ctx1__.__MessageOut = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 15;
            case 15:
                if ( !PreProgressInc( __seg__, __ctx__, 16 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[9],__eventData[6],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 16;
            case 16:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 17;
            case 17:
                if ( !PreProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 18;
            case 18:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            bool __condition__;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[1];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __subImportGuardRecord_1 __ctx1__ = (__subImportGuardRecord_1)_stateMgrs[1];
            __Transaction_2_2 __ctx2__ = (__Transaction_2_2)_stateMgrs[2];
            __subImportGuardRecord_root_0 __ctx0__ = (__subImportGuardRecord_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__FileId = (System.Int32)Args[2];
                __ctx1__.__ImportGuard = new __messagetype_MedegaImportSchema_Schemas_Medega_Guard("ImportGuard", __ctx1__);
                __ctx1__.__ImportGuard.CopyFrom((Microsoft.XLANGs.Core.XMessage)Args[0]);
                __ctx1__.RefMessage(__ctx1__.__ImportGuard);
                __ctx1__.__ImportGuard.ConstructionCompleteEvent();
                __ctx1__.__ImportFileResponse = new CreateMedegaFileResponse("ImportFileResponse", __ctx1__);
                __ctx1__.__ImportFileResponse.CopyFrom((Microsoft.XLANGs.Core.XMessage)Args[1]);
                __ctx1__.RefMessage(__ctx1__.__ImportFileResponse);
                __ctx1__.__ImportFileResponse.ConstructionCompleteEvent();
                if ( !PostProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 1;
            case 1:
                __ctx1__.__ImportXmlException = default(System.Exception);
                __ctx1__.__tempXmlDoc = new Microsoft.XLANGs.RuntimeTypes.XmlDocumentSerializationProxy();
                __ctx1__.__returnCode = default(System.Int32);
                __ctx1__.__ExceptionDescription = default(System.String);
                __ctx1__.__InnerExceptionDescription = default(System.String);
                __ctx1__.__NewFileStatusId = default(System.Int32);
                __ctx1__.__TechnicalErrorOccured = default(System.Boolean);
                __ctx1__.__validationResult = default(System.String);
                __ctx1__.__businessRulesOK = default(System.Boolean);
                __ctx__.PrologueCompleted = true;
                if ( !PostProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                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:
                __ctx1__.__ImportXmlException = new System.Exception();
                if ( !PostProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 4;
            case 4:
                __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                if ( !PostProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 5;
            case 5:
                __ctx1__.__ExceptionDescription = "";
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx1__.__InnerExceptionDescription = "";
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                __ctx1__.__TechnicalErrorOccured = true;
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                __ctx1__.__validationResult = "";
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                __ctx1__.__businessRulesOK = true;
                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[2],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 11;
            case 11:
                __ctx1__.__returnCode = -99;
                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;
                Tracker.FireEvent(__eventLocations[3],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 13;
            case 13:
                __ctx1__.__businessRulesOK = true;
                if ( !PostProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 14;
            case 14:
                __ctx1__.__TechnicalErrorOccured = false;
                if ( !PostProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 15;
            case 15:
                __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = __ctx1__.__ImportFileResponse.parameters.TypedValue;
                if ( !PostProgressInc( __seg__, __ctx__, 16 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 16;
            case 16:
                if ( !PreProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[4],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 17;
            case 17:
                {
                    __messagetype_System_Xml_XmlDocument __Context = new __messagetype_System_Xml_XmlDocument("Context", __ctx1__);
                    __messagetype_System_Xml_XmlDocument __ExceptionMsg = new __messagetype_System_Xml_XmlDocument("ExceptionMsg", __ctx1__);
                    CreateMedegaXmlNodeResponse __SQLCreateMedegaXmlNodeResponse = new CreateMedegaXmlNodeResponse("SQLCreateMedegaXmlNodeResponse", __ctx1__);
                    BusinessValidationErrors __BusinessValidationErrorsMsg = new BusinessValidationErrors("BusinessValidationErrorsMsg", __ctx1__);

                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument.LoadXml("<empty/>");
                    __Context.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);
                    __ExceptionMsg.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);
                    __SQLCreateMedegaXmlNodeResponse.parameters.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);
                    __BusinessValidationErrorsMsg.BusinessErrorMessages.LoadFrom("");
                    __BusinessValidationErrorsMsg.FileId.LoadFrom("FileId = " + System.Convert.ToString(__ctx1__.__FileId));

                    if (__ctx1__.__Context != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = __Context;
                    __ctx1__.RefMessage(__ctx1__.__Context);
                    if (__ctx1__.__ExceptionMsg != null)
                        __ctx1__.UnrefMessage(__ctx1__.__ExceptionMsg);
                    __ctx1__.__ExceptionMsg = __ExceptionMsg;
                    __ctx1__.RefMessage(__ctx1__.__ExceptionMsg);
                    if (__ctx1__.__SQLCreateMedegaXmlNodeResponse != null)
                        __ctx1__.UnrefMessage(__ctx1__.__SQLCreateMedegaXmlNodeResponse);
                    __ctx1__.__SQLCreateMedegaXmlNodeResponse = __SQLCreateMedegaXmlNodeResponse;
                    __ctx1__.RefMessage(__ctx1__.__SQLCreateMedegaXmlNodeResponse);
                    if (__ctx1__.__BusinessValidationErrorsMsg != null)
                        __ctx1__.UnrefMessage(__ctx1__.__BusinessValidationErrorsMsg);
                    __ctx1__.__BusinessValidationErrorsMsg = __BusinessValidationErrorsMsg;
                    __ctx1__.RefMessage(__ctx1__.__BusinessValidationErrorsMsg);
                }
                __ctx1__.__Context.ConstructionCompleteEvent(false);
                __ctx1__.__ExceptionMsg.ConstructionCompleteEvent(false);
                __ctx1__.__SQLCreateMedegaXmlNodeResponse.ConstructionCompleteEvent(false);
                __ctx1__.__BusinessValidationErrorsMsg.ConstructionCompleteEvent(false);
                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;
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Construct);
                    __edata.Messages.Add(__ctx1__.__Context);
                    __edata.Messages.Add(__ctx1__.__ExceptionMsg);
                    __edata.Messages.Add(__ctx1__.__SQLCreateMedegaXmlNodeResponse);
                    __edata.Messages.Add(__ctx1__.__BusinessValidationErrorsMsg);
                    Tracker.FireEvent(__eventLocations[5],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__SQLCreateMedegaXmlNodeResponse != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__SQLCreateMedegaXmlNodeResponse);
                    __ctx1__.__SQLCreateMedegaXmlNodeResponse = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 19;
            case 19:
                if ( !PreProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[6],__eventData[5],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 20;
            case 20:
                __ctx2__ = new __Transaction_2_2(this);
                _stateMgrs[2] = __ctx2__;
                if ( !PostProgressInc( __seg__, __ctx__, 21 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 21;
            case 21:
                __ctx1__.StartContext(__seg__, __ctx2__);
                if ( !PostProgressInc( __seg__, __ctx__, 22 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 22:
                if ( !PreProgressInc( __seg__, __ctx__, 23 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null)
                    __ctx1__.__validationResult = null;
                if (__ctx1__ != null)
                    __ctx1__.__tempXmlDoc = null;
                if (__ctx1__ != null && __ctx1__.__Context != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = null;
                }
                Tracker.FireEvent(__eventLocations[41],__eventData[8],_stateMgrs[1].TrackDataStream );
                __ctx2__.Finally();
                if (__ctx2__ != null)
                    __ctx2__.__InnerExceptionDescription = null;
                if (__ctx2__ != null)
                    __ctx2__.__ExceptionDescription = null;
                if (__ctx2__ != null)
                    __ctx2__.__ImportXmlException = null;
                if (__ctx2__ != null && __ctx2__.__ExceptionMsg != null)
                {
                    __ctx2__.UnrefMessage(__ctx2__.__ExceptionMsg);
                    __ctx2__.__ExceptionMsg = null;
                }
                if (__ctx1__ != null)
                    __ctx1__.__InnerExceptionDescription = null;
                if (__ctx1__ != null)
                    __ctx1__.__ExceptionDescription = null;
                if (__ctx1__ != null)
                    __ctx1__.__ImportXmlException = null;
                if (__ctx1__ != null && __ctx1__.__ExceptionMsg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__ExceptionMsg);
                    __ctx1__.__ExceptionMsg = null;
                }
                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[42],__eventData[9],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 24;
            case 24:
                __condition__ = __ctx1__.__TechnicalErrorOccured;
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 29 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 29;
                }
                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[43],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 26;
            case 26:
                __ctx1__.__NewFileStatusId = System.Convert.ToInt32(MedegaImport.MedegaImportTypes.MedegaFileStatusEnum.InError);
                if ( !PostProgressInc( __seg__, __ctx__, 27 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 27;
            case 27:
                if ( !PreProgressInc( __seg__, __ctx__, 28 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[44],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 28;
            case 28:
                if ( !PostProgressInc( __seg__, __ctx__, 43 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 43;
            case 29:
                if ( !PreProgressInc( __seg__, __ctx__, 30 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[45],__eventData[9],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 30;
            case 30:
                __condition__ = !__ctx1__.__businessRulesOK;
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 39 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 39;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 31 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 31;
            case 31:
                if ( !PreProgressInc( __seg__, __ctx__, 32 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[46],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 32;
            case 32:
                __ctx1__.__NewFileStatusId = System.Convert.ToInt32(MedegaImport.MedegaImportTypes.MedegaFileStatusEnum.NotValid);
                if ( !PostProgressInc( __seg__, __ctx__, 33 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 33;
            case 33:
                if ( !PreProgressInc( __seg__, __ctx__, 34 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[47],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 34;
            case 34:
                if ( !PreProgressInc( __seg__, __ctx__, 35 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[48],__eventData[14],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 35;
            case 35:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 36 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 36;
            case 36:
                if ( !PreProgressInc( __seg__, __ctx__, 37 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                SendBusinessErrors.SendMessage(0, __ctx1__.__BusinessValidationErrorsMsg, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.None );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 37;
            case 37:
                if ( !PreProgressInc( __seg__, __ctx__, 38 ) )
                    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__.__BusinessValidationErrorsMsg);
                    __edata.PortName = @"SendBusinessErrors";
                    Tracker.FireEvent(__eventLocations[49],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 38;
            case 38:
                if ( !PostProgressInc( __seg__, __ctx__, 42 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 42;
            case 39:
                if ( !PreProgressInc( __seg__, __ctx__, 40 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[50],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 40;
            case 40:
                __ctx1__.__NewFileStatusId = System.Convert.ToInt32(MedegaImport.MedegaImportTypes.MedegaFileStatusEnum.Pending);
                if ( !PostProgressInc( __seg__, __ctx__, 41 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 41;
            case 41:
                Tracker.FireEvent(__eventLocations[51],__eventData[3],_stateMgrs[1].TrackDataStream );
                if ( !PostProgressInc( __seg__, __ctx__, 42 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 42;
            case 42:
                if ( !PreProgressInc( __seg__, __ctx__, 43 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[52],__eventData[11],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 43;
            case 43:
                if ( !PreProgressInc( __seg__, __ctx__, 44 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null && __ctx1__.__BusinessValidationErrorsMsg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__BusinessValidationErrorsMsg);
                    __ctx1__.__BusinessValidationErrorsMsg = null;
                }
                if (SendBusinessErrors != null)
                {
                    SendBusinessErrors.Close(__ctx1__, __seg__);
                    SendBusinessErrors = null;
                }
                Tracker.FireEvent(__eventLocations[53],__eventData[11],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 44;
            case 44:
                if ( !PreProgressInc( __seg__, __ctx__, 45 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[54],__eventData[12],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 45;
            case 45:
                {
                    Microsoft.XLANGs.Core.Service svc = new MedegaImport.subUpdateFileStatus(6, InstanceId, this);
                    _stateMgrs[6] = svc;
                    __ctx1__.StartCall(__seg__, svc, __eventLocations[54],new object[] {__ctx1__.__FileId, __ctx1__.__NewFileStatusId});
                }
                if ( !PostProgressInc( __seg__, __ctx__, 46 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 46:
                if ( !PreProgressInc( __seg__, __ctx__, 47 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    object[] args = ((Microsoft.XLANGs.Core.Service)_stateMgrs[6]).Args;
                }
                Tracker.FireEvent(__eventLocations[55],__eventData[13],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 47;
            case 47:
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Body);
                    __edata.Messages.Add(__ctx1__.__ImportGuard);
                    __edata.Messages.Add(__ctx1__.__ImportFileResponse);
                    Tracker.FireEvent(__eventLocations[0],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__ImportFileResponse != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__ImportFileResponse);
                    __ctx1__.__ImportFileResponse = null;
                }
                if (__ctx1__ != null && __ctx1__.__ImportGuard != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__ImportGuard);
                    __ctx1__.__ImportGuard = null;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 48 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 48;
            case 48:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 49 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 49;
            case 49:
                if ( !PreProgressInc( __seg__, __ctx__, 50 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 50;
            case 50:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #23
0
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[1];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __CalledOrch_root_0 __ctx0__ = (__CalledOrch_root_0)_stateMgrs[0];
            __CalledOrch_1 __ctx1__ = (__CalledOrch_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__MessageIN = new __messagetype_LeaveProject_LeaveRequestSchema("MessageIN", __ctx1__);
                __ctx1__.__MessageIN.CopyFrom((Microsoft.XLANGs.Core.XMessage)Args[0]);
                __ctx1__.RefMessage(__ctx1__.__MessageIN);
                __ctx1__.__MessageIN.ConstructionCompleteEvent();
                __ctx1__.__MessageOut = null;
                if ( !PostProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 1;
            case 1:
                __ctx__.PrologueCompleted = true;
                if ( !PostProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                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 ( !PreProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[2],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 4;
            case 4:
                {
                    __messagetype_LeaveProject_LeaveRequestSchema __MessageOut = new __messagetype_LeaveProject_LeaveRequestSchema("MessageOut", __ctx1__);

                    __MessageOut.CopyFrom(__ctx1__.__MessageIN);
                    __MessageOut.part.SetDistinguishedField("Details.Reason", "Modifeid by Called Orch");

                    if (__ctx1__.__MessageOut != null)
                        __ctx1__.UnrefMessage(__ctx1__.__MessageOut);
                    __ctx1__.__MessageOut = __MessageOut;
                    __ctx1__.RefMessage(__ctx1__.__MessageOut);
                }
                __ctx1__.__MessageOut.ConstructionCompleteEvent(false);
                if ( !PostProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    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__.__MessageOut);
                    Tracker.FireEvent(__eventLocations[3],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Body);
                    __edata.Messages.Add(__ctx1__.__MessageIN);
                    __edata.Messages.Add(__ctx1__.__MessageOut);
                    Tracker.FireEvent(__eventLocations[0],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__MessageIN != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__MessageIN);
                    __ctx1__.__MessageIN = null;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                if ( !PreProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 9;
            case 9:
                ((Microsoft.XLANGs.Core.MessageTuple)(Args[1])).message = __ctx1__.__MessageOut;
                ((Microsoft.XLANGs.Core.MessageTuple)(Args[1])).context.RefMessage(__ctx1__.__MessageOut);
                if ( !PostProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 10;
            case 10:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
        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];
            __SampleHireProcess_root_0     __ctx0__   = (__SampleHireProcess_root_0)_stateMgrs[0];
            __SampleHireProcess_1          __ctx1__   = (__SampleHireProcess_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!ReceiveNewHireRequest.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__msgNewHire != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgNewHire);
                }
                __ctx1__.__msgNewHire = new __messagetype_Sample_Role_Link_Recipe_SampleNewHireRequest("msgNewHire", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__msgNewHire);
                ReceiveNewHireRequest.ReceiveMessage(0, __msgEnv__, __ctx1__.__msgNewHire, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (ReceiveNewHireRequest != null)
                {
                    ReceiveNewHireRequest.Close(__ctx1__, __seg__);
                    ReceiveNewHireRequest = 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__.__msgNewHire);
                    __edata.PortName = @"ReceiveNewHireRequest";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                if (!PreProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[3], __eventData[2], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 6;

            case 6:
                __ctx1__.NewHireApproval = new Microsoft.XLANGs.Core.ServiceLink(
                    new Microsoft.XLANGs.Core.PortBase[] {
                    __NewHireApproval_SendPortType
                });
                __ctx1__.NewHireApproval.SetPropertyValue(typeof(Microsoft.XLANGs.BaseTypes.DestinationParty), new Microsoft.XLANGs.BaseTypes.Party((System.String)__ctx1__.__msgNewHire.part.GetDistinguishedField("Approver"), "OrganizationName"));
                RootService.CommitStateManager.UserCodeCalled = true;
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[4], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                __ctx1__.NewHireApproval[0].SendMessage(0, __ctx1__.__msgNewHire, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (__ctx1__ != null)
                {
                    __ctx1__.NewHireApproval = null;
                }
                if (__NewHireApproval_SendPortType != null)
                {
                    __NewHireApproval_SendPortType.Close(__ctx1__, __seg__);
                    __NewHireApproval_SendPortType = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingRqst);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    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__.__msgNewHire);
                    __edata.PortName = @"__NewHireApproval_SendPortType";
                    Tracker.FireEvent(__eventLocations[6], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__msgNewHire != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgNewHire);
                    __ctx1__.__msgNewHire = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 12;

            case 12:
                if (!PreProgressInc(__seg__, __ctx__, 13))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[7], __eventData[5], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 13;

            case 13:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 14))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 14;

            case 14:
                if (!PreProgressInc(__seg__, __ctx__, 15))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 15;

            case 15:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
        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];
            __MainOrchestration_root_0     __ctx0__   = (__MainOrchestration_root_0)_stateMgrs[0];
            __MainOrchestration_1          __ctx1__   = (__MainOrchestration_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__varParm1       = default(System.String);
                __ctx1__.__varParm2       = 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 (!ReceivePort.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__msgInput != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgInput);
                }
                __ctx1__.__msgInput = new __messagetype_CallExternalOrchestrationMainSolution_InputSchema("msgInput", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__msgInput);
                ReceivePort.ReceiveMessage(0, __msgEnv__, __ctx1__.__msgInput, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (ReceivePort != null)
                {
                    ReceivePort.Close(__ctx1__, __seg__);
                    ReceivePort = 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__.__msgInput);
                    __edata.PortName = @"ReceivePort";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                __ctx1__.__varParm1 = "";
                if (!PostProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 6;

            case 6:
                __ctx1__.__varParm2 = "";
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    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 8;

            case 8:
                __ctx1__.__varParm1 = (System.String)__ctx1__.__msgInput.part.GetDistinguishedField("Param1");
                if (!PostProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 9;

            case 9:
                if (!PreProgressInc(__seg__, __ctx__, 10))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 10;

            case 10:
                __ctx1__.__varParm2 = (System.String)__ctx1__.__msgInput.part.GetDistinguishedField("Param2");
                if (__ctx1__ != null)
                {
                    __ctx1__.__varParm2 = null;
                }
                if (__ctx1__ != null && __ctx1__.__msgInput != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgInput);
                    __ctx1__.__msgInput = null;
                }
                if (!PostProgressInc(__seg__, __ctx__, 11))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[6], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 12;

            case 12:
            {
                Microsoft.XLANGs.Core.Service svc = new CallExternalOrchestrationCommonSolution.OrchestrationToBeCalled(2, InstanceId, this);
                _stateMgrs[2] = svc;
                __ctx1__.StartCall(__seg__, svc, __eventLocations[6], new object[] { __ctx1__.__varParm1, __ctx1__.__varParm1 });
            }
                if (!PostProgressInc(__seg__, __ctx__, 13))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                return(Microsoft.XLANGs.Core.StopConditions.Blocked);

            case 13:
                if (!PreProgressInc(__seg__, __ctx__, 14))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                {
                    object[] args = ((Microsoft.XLANGs.Core.Service)_stateMgrs[2]).Args;
                }
                if (__ctx1__ != null)
                {
                    __ctx1__.__varParm1 = null;
                }
                Tracker.FireEvent(__eventLocations[7], __eventData[5], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 14;

            case 14:
                if (!PreProgressInc(__seg__, __ctx__, 15))
                {
                    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 15;

            case 15:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 16))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 16;

            case 16:
                if (!PreProgressInc(__seg__, __ctx__, 17))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 17;

            case 17:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
Beispiel #26
0
        public Microsoft.XLANGs.Core.StopConditions segment3(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[3];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __SZDSOI_Orchestration_root_0 __ctx0__ = (__SZDSOI_Orchestration_root_0)_stateMgrs[0];
            __SZDSOI_Orchestration_1 __ctx1__ = (__SZDSOI_Orchestration_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                if ( !PreProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[29],__eventData[6],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 1;
            case 1:
                {
                    __messagetype_Kaifa_B2B_Schemas_RosettaNet_SGRTHUB4C1_MS_1_0_SupplierOwnInventory __Pip4C1ForE2OpenMessage = new __messagetype_Kaifa_B2B_Schemas_RosettaNet_SGRTHUB4C1_MS_1_0_SupplierOwnInventory("Pip4C1ForE2OpenMessage", __ctx1__);

                    ApplyTransform(typeof(Kaifa.B2B.SZD.Mapping.Inventory_To_4C1_e2open), new object[] {__Pip4C1ForE2OpenMessage.part}, new object[] {__ctx1__.__VendorReportMessage.part});
                    __ctx1__.__pipInstanceIdentifierFore2open = (System.String)__Pip4C1ForE2OpenMessage.part.GetDistinguishedField("thisDocumentIdentifier.ProprietaryDocumentIdentifier");
                    __Pip4C1ForE2OpenMessage.SetPropertyValue(typeof(FILE.ReceivedFileName), "SOI_To_e2open_" + __ctx1__.__pipInstanceIdentifierFore2open + ".xml");

                    if (__ctx1__.__Pip4C1ForE2OpenMessage != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Pip4C1ForE2OpenMessage);
                    __ctx1__.__Pip4C1ForE2OpenMessage = __Pip4C1ForE2OpenMessage;
                    __ctx1__.RefMessage(__ctx1__.__Pip4C1ForE2OpenMessage);
                }
                __ctx1__.__Pip4C1ForE2OpenMessage.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 2;
            case 2:
                if ( !PreProgressInc( __seg__, __ctx__, 3 ) )
                    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__.__Pip4C1ForE2OpenMessage);
                    __edata.Messages.Add(__ctx1__.__VendorReportMessage);
                    Tracker.FireEvent(__eventLocations[30],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 3;
            case 3:
                if ( !PreProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[31],__eventData[9],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 4;
            case 4:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                SendPip4C1Message.SendMessage(0, __ctx1__.__Pip4C1ForE2OpenMessage, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.None );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 6;
            case 6:
                if ( !PreProgressInc( __seg__, __ctx__, 7 ) )
                    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__.__Pip4C1ForE2OpenMessage);
                    __edata.PortName = @"SendPip4C1Message";
                    Tracker.FireEvent(__eventLocations[32],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[33],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                __ctx1__.__pipInstanceMessageIdFore2open = (System.String)__ctx1__.__Pip4C1ForE2OpenMessage.GetPropertyValueThrows(typeof(BTS.MessageID));
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[34],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 10;
            case 10:
                __ctx1__.__strPipMessageFore2open = Kaifa.B2B.Utility.HeaderHelper.ReturnSCWithDocType(__ctx1__.__Pip4C1ForE2OpenMessage.part.TypedValue, "4C1V0200");
                if (__ctx1__ != null && __ctx1__.__Pip4C1ForE2OpenMessage != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Pip4C1ForE2OpenMessage);
                    __ctx1__.__Pip4C1ForE2OpenMessage = null;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 11:
                System.Diagnostics.Trace.WriteLine("SubmitRNIF.SubmitMessage To e2open " + __ctx1__.__pipInstanceMessageIdFore2open + " - " + __ctx1__.__pipInstanceIdentifierFore2open, "kaifa.b2b");
                if ( !PostProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 12;
            case 12:
                __ctx1__.__SubmitRNIF1.SubmitMessage(Microsoft.Solutions.BTARN.Shared.MessageCategory.AsyncAction, "KAIFA", "E2OPEN", "4C1", __ctx1__.__pipInstanceIdentifierFore2open, "R02.00", __ctx1__.__strPipMessageFore2open);
                if ( !PostProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 13;
            case 13:
                __seg__.SegmentDone();
                _segments[1].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #27
0
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment    __seg__  = _segments[1];
            Microsoft.XLANGs.Core.Context    __ctx__  = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __OrchestrationToBeCalled_1      __ctx1__ = (__OrchestrationToBeCalled_1)_stateMgrs[1];
            __OrchestrationToBeCalled_root_0 __ctx0__ = (__OrchestrationToBeCalled_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__varInputParm1 = (System.String)Args[0];
                __ctx1__.__varInputParm2 = (System.String)Args[1];
                if (!PostProgressInc(__seg__, __ctx__, 1))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 1;

            case 1:
                __ctx1__.__varNote        = default(System.String);
                __ctx1__.__varXML         = new Microsoft.XLANGs.RuntimeTypes.XmlDocumentSerializationProxy();
                __ctx__.PrologueCompleted = true;
                if (!PostProgressInc(__seg__, __ctx__, 2))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                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:
                __ctx1__.__varNote = "";
                if (!PostProgressInc(__seg__, __ctx__, 4))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 4;

            case 4:
                __ctx1__.__varXML.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                if (!PostProgressInc(__seg__, __ctx__, 5))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 5;

            case 5:
                if (!PreProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[2], __eventData[2], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 6;

            case 6:
                __ctx1__.__varNote = "do something";
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[3], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[4], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
            {
                __messagetype_CallExternalOrchestrationCommonSolution_OutputSchema __msgOutput = new __messagetype_CallExternalOrchestrationCommonSolution_OutputSchema("msgOutput", __ctx1__);

                __ctx1__.__varXML.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                __ctx1__.__varXML.UnderlyingXmlDocument.LoadXml(@"<ns0:OutputSchema xmlns:ns0=""http://CallExternalOrchestrationCommonSolution.OutputSchema""><Param1>" + __ctx1__.__varInputParm1 + "</Param1><Param2>" + __ctx1__.__varInputParm2 + "</Param2><Note>" + __ctx1__.__varNote + "</Note><ProcessDate>" + System.DateTime.Now.ToString() + "</ProcessDate></ns0:OutputSchema>");
                if (__ctx1__ != null)
                {
                    __ctx1__.__varInputParm2 = null;
                }
                if (__ctx1__ != null)
                {
                    __ctx1__.__varInputParm1 = null;
                }
                if (__ctx1__ != null)
                {
                    __ctx1__.__varNote = null;
                }
                __msgOutput.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__varXML.UnderlyingXmlDocument);
                if (__ctx1__ != null)
                {
                    __ctx1__.__varXML = null;
                }

                if (__ctx1__.__msgOutput != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgOutput);
                }
                __ctx1__.__msgOutput = __msgOutput;
                __ctx1__.RefMessage(__ctx1__.__msgOutput);
            }
                __ctx1__.__msgOutput.ConstructionCompleteEvent(false);
                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);
                }
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Construct);
                    __edata.Messages.Add(__ctx1__.__msgOutput);
                    Tracker.FireEvent(__eventLocations[5], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[6], __eventData[5], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 12;

            case 12:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 13))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 13;

            case 13:
                if (!PreProgressInc(__seg__, __ctx__, 14))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                SendPort.SendMessage(0, __ctx1__.__msgOutput, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (SendPort != null)
                {
                    SendPort.Close(__ctx1__, __seg__);
                    SendPort = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingRqst);
                }
                goto case 14;

            case 14:
                if (!PreProgressInc(__seg__, __ctx__, 15))
                {
                    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__.__msgOutput);
                    __edata.PortName = @"SendPort";
                    Tracker.FireEvent(__eventLocations[7], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__msgOutput != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgOutput);
                    __ctx1__.__msgOutput = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 15;

            case 15:
                if (!PreProgressInc(__seg__, __ctx__, 16))
                {
                    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 16;

            case 16:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 17))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 17;

            case 17:
                if (!PreProgressInc(__seg__, __ctx__, 18))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 18;

            case 18:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
        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];
            ____scope33_2                 __ctx2__    = (____scope33_2)_stateMgrs[2];
            __Sample1Orchestration_1      __ctx1__    = (__Sample1Orchestration_1)_stateMgrs[1];
            __Sample1Orchestration_root_0 __ctx0__    = (__Sample1Orchestration_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__SSISApp        = default(Microsoft.SqlServer.Dts.Runtime.Application);
                __ctx1__.__SSISPkg        = default(Microsoft.SqlServer.Dts.Runtime.Package);
                __ctx1__.__SSISVar        = default(Microsoft.SqlServer.Dts.Runtime.Variable);
                __ctx1__.__Sample1Message = null;
                __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 (!Sample1Port.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__Sample1Message != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Sample1Message);
                }
                __ctx1__.__Sample1Message = new __messagetype_Sample1_SalesSchema("Sample1Message", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__Sample1Message);
                Sample1Port.ReceiveMessage(0, __msgEnv__, __ctx1__.__Sample1Message, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                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__.__Sample1Message);
                    __edata.PortName = @"Sample1Port";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                __ctx1__.__SSISApp = new Microsoft.SqlServer.Dts.Runtime.Application();
                if (!PostProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 6;

            case 6:
                __ctx1__.__SSISPkg = new Microsoft.SqlServer.Dts.Runtime.Package();
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    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 8;

            case 8:
                __ctx2__      = new ____scope33_2(this);
                _stateMgrs[2] = __ctx2__;
                if (!PostProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 9;

            case 9:
                __ctx1__.StartContext(__seg__, __ctx2__);
                if (!PostProgressInc(__seg__, __ctx__, 10))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                return(Microsoft.XLANGs.Core.StopConditions.Blocked);

            case 10:
                if (!PreProgressInc(__seg__, __ctx__, 11))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[9], __eventData[5], _stateMgrs[1].TrackDataStream);
                __ctx2__.Finally();
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    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 12;

            case 12:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 13))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 13;

            case 13:
                if (!PreProgressInc(__seg__, __ctx__, 14))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 14;

            case 14:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
Beispiel #29
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];
            __ProcessOrder_1      __ctx1__            = (__ProcessOrder_1)_stateMgrs[1];
            __ProcessOrder_root_0 __ctx0__            = (__ProcessOrder_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__Loggables      = default(SONES.Biztalk.Log.Log);
                __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 (!OrderRequest.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__OrderRequestMsg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__OrderRequestMsg);
                }
                __ctx1__.__OrderRequestMsg = new __messagetype_SONES_Biztalk_Schemas_Customer("OrderRequestMsg", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__OrderRequestMsg);
                OrderRequest.ReceiveMessage(0, __msgEnv__, __ctx1__.__OrderRequestMsg, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (OrderRequest != null)
                {
                    OrderRequest.Close(__ctx1__, __seg__);
                    OrderRequest = 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__.__OrderRequestMsg);
                    __edata.PortName = @"OrderRequest";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                __ctx1__.__Loggables = new SONES.Biztalk.Log.Log();
                if (!PostProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 6;

            case 6:
                if (!PreProgressInc(__seg__, __ctx__, 7))
                {
                    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 7;

            case 7:
                __ctx1__.__Loggables.Logs(CreateMessageWrapperForUserCode(__ctx1__.__OrderRequestMsg));
                if (__ctx1__ != null)
                {
                    __ctx1__.__Loggables = null;
                }
                if (!PostProgressInc(__seg__, __ctx__, 8))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!PreProgressInc(__seg__, __ctx__, 10))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[6], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 10;

            case 10:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 11))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Order_Send_Port.SendMessage(0, __ctx1__.__OrderRequestMsg, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (Order_Send_Port != null)
                {
                    Order_Send_Port.Close(__ctx1__, __seg__);
                    Order_Send_Port = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingRqst);
                }
                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.Send);
                    __edata.Messages.Add(__ctx1__.__OrderRequestMsg);
                    __edata.PortName = @"Order_Send_Port";
                    Tracker.FireEvent(__eventLocations[7], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__OrderRequestMsg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__OrderRequestMsg);
                    __ctx1__.__OrderRequestMsg = null;
                }
                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[3], __eventData[5], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 14;

            case 14:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                __ctx1__.OnCommit();
                goto case 16;

            case 16:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
Beispiel #30
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];
            __DB_root_0 __ctx0__ = (__DB_root_0)_stateMgrs[0];
            __DB_1      __ctx1__ = (__DB_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!Port_1.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__In_msg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__In_msg);
                }
                __ctx1__.__In_msg = new __messagetype_Map_database_Incoming_Data("In_msg", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__In_msg);
                Port_1.ReceiveMessage(0, __msgEnv__, __ctx1__.__In_msg, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (Port_1 != null)
                {
                    Port_1.Close(__ctx1__, __seg__);
                    Port_1 = 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__.__In_msg);
                    __edata.PortName = @"Port_1";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                if (!PreProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[3], __eventData[2], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 6;

            case 6:
            {
                __messagetype_Map_database_Outcoming_Data __Out_Msg = new __messagetype_Map_database_Outcoming_Data("Out_Msg", __ctx1__);

                ApplyTransform(typeof(Map_database.Map1), new object[] { __Out_Msg.part }, new object[] { __ctx1__.__In_msg.part });

                if (__ctx1__.__Out_Msg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Out_Msg);
                }
                __ctx1__.__Out_Msg = __Out_Msg;
                __ctx1__.RefMessage(__ctx1__.__Out_Msg);
            }
                __ctx1__.__Out_Msg.ConstructionCompleteEvent(true);
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    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__.__Out_Msg);
                    __edata.Messages.Add(__ctx1__.__In_msg);
                    Tracker.FireEvent(__eventLocations[4], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__In_msg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__In_msg);
                    __ctx1__.__In_msg = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                Port_2.SendMessage(0, __ctx1__.__Out_Msg, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (Port_2 != null)
                {
                    Port_2.Close(__ctx1__, __seg__);
                    Port_2 = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingRqst);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    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__.__Out_Msg);
                    __edata.PortName = @"Port_2";
                    Tracker.FireEvent(__eventLocations[6], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__Out_Msg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Out_Msg);
                    __ctx1__.__Out_Msg = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 12;

            case 12:
                if (!PreProgressInc(__seg__, __ctx__, 13))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[7], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 13;

            case 13:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 14))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 14;

            case 14:
                if (!PreProgressInc(__seg__, __ctx__, 15))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 15;

            case 15:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
Beispiel #31
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];
            __ClaimEnumerator_root_0 __ctx0__ = (__ClaimEnumerator_root_0)_stateMgrs[0];
            __ClaimEnumerator_1 __ctx1__ = (__ClaimEnumerator_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__responseXml = new Microsoft.XLANGs.RuntimeTypes.XmlDocumentSerializationProxy();
                __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 (!ClaimsBizTalkServicePort.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__msg_claimsRequest != null)
                    __ctx1__.UnrefMessage(__ctx1__.__msg_claimsRequest);
                __ctx1__.__msg_claimsRequest = new __messagetype_ClaimsBizTalkService_claimsRequest("msg_claimsRequest", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__msg_claimsRequest);
                ClaimsBizTalkServicePort.ReceiveMessage(0, __msgEnv__, __ctx1__.__msg_claimsRequest, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                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__.__msg_claimsRequest);
                    __edata.PortName = @"ClaimsBizTalkServicePort";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                __ctx1__.__responseXml.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                if (__ctx1__ != null)
                    __ctx1__.__responseXml = null;
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                if ( !PreProgressInc( __seg__, __ctx__, 7 ) )
                    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 7;
            case 7:
                {
                    __messagetype_ClaimsBizTalkService_claimsResponse __msg_claimsResponse = new __messagetype_ClaimsBizTalkService_claimsResponse("msg_claimsResponse", __ctx1__);

                    ApplyTransform(typeof(ClaimsBizTalkService.Transform_1), new object[] {__msg_claimsResponse.part}, new object[] {__ctx1__.__msg_claimsRequest.part});

                    if (__ctx1__.__msg_claimsResponse != null)
                        __ctx1__.UnrefMessage(__ctx1__.__msg_claimsResponse);
                    __ctx1__.__msg_claimsResponse = __msg_claimsResponse;
                    __ctx1__.RefMessage(__ctx1__.__msg_claimsResponse);
                }
                __ctx1__.__msg_claimsResponse.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                if ( !PreProgressInc( __seg__, __ctx__, 9 ) )
                    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__.__msg_claimsResponse);
                    __edata.Messages.Add(__ctx1__.__msg_claimsRequest);
                    Tracker.FireEvent(__eventLocations[5],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__msg_claimsRequest != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msg_claimsRequest);
                    __ctx1__.__msg_claimsRequest = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[6],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 10;
            case 10:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 11:
                if ( !PreProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                ClaimsBizTalkServicePort.SendMessage(0, __ctx1__.__msg_claimsResponse, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists );
                if (ClaimsBizTalkServicePort != null)
                {
                    ClaimsBizTalkServicePort.Close(__ctx1__, __seg__);
                    ClaimsBizTalkServicePort = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingResp) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingResp;
                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.Send);
                    __edata.Messages.Add(__ctx1__.__msg_claimsResponse);
                    __edata.PortName = @"ClaimsBizTalkServicePort";
                    Tracker.FireEvent(__eventLocations[7],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__msg_claimsResponse != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msg_claimsResponse);
                    __ctx1__.__msg_claimsResponse = null;
                }
                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[3],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 14;
            case 14:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                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;
                __ctx1__.OnCommit();
                goto case 16;
            case 16:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[1];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            ____scope41_2 __ctx2__ = (____scope41_2)_stateMgrs[2];
            __subUpdateNodeStatus_root_0 __ctx0__ = (__subUpdateNodeStatus_root_0)_stateMgrs[0];
            __subUpdateNodeStatus_1 __ctx1__ = (__subUpdateNodeStatus_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__NodeId = (System.Int64)Args[0];
                __ctx1__.__StatusId = (System.Int32)Args[1];
                __ctx1__.__ReasonOfFailure = (System.String)Args[2];
                if ( !PostProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 1;
            case 1:
                __ctx1__.__InnerExceptionDescription = default(System.String);
                __ctx1__.__ExceptionDescription = default(System.String);
                __ctx1__.__tempXmlDoc = new Microsoft.XLANGs.RuntimeTypes.XmlDocumentSerializationProxy();
                __ctx1__.__returnCode = default(System.Int32);
                __ctx1__.__tempString = default(System.String);
                __ctx__.PrologueCompleted = true;
                if ( !PostProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                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:
                __ctx1__.__InnerExceptionDescription = "";
                if ( !PostProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 4;
            case 4:
                __ctx1__.__ExceptionDescription = "";
                if ( !PostProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 5;
            case 5:
                __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx1__.__tempString = "";
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[2],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                {
                    __messagetype_System_Xml_XmlDocument __Context = new __messagetype_System_Xml_XmlDocument("Context", __ctx1__);
                    __messagetype_System_Xml_XmlDocument __ErrMsg = new __messagetype_System_Xml_XmlDocument("ErrMsg", __ctx1__);

                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument.LoadXml("<empty/>");
                    __Context.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);
                    __ErrMsg.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);

                    if (__ctx1__.__Context != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = __Context;
                    __ctx1__.RefMessage(__ctx1__.__Context);
                    if (__ctx1__.__ErrMsg != null)
                        __ctx1__.UnrefMessage(__ctx1__.__ErrMsg);
                    __ctx1__.__ErrMsg = __ErrMsg;
                    __ctx1__.RefMessage(__ctx1__.__ErrMsg);
                }
                __ctx1__.__Context.ConstructionCompleteEvent(false);
                __ctx1__.__ErrMsg.ConstructionCompleteEvent(false);
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    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__.__Context);
                    __edata.Messages.Add(__ctx1__.__ErrMsg);
                    Tracker.FireEvent(__eventLocations[3],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 10;
            case 10:
                if ( !PreProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[4],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 11;
            case 11:
                __ctx2__ = new ____scope41_2(this);
                _stateMgrs[2] = __ctx2__;
                if ( !PostProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 12;
            case 12:
                __ctx1__.StartContext(__seg__, __ctx2__);
                if ( !PostProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 13:
                if ( !PreProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null)
                    __ctx1__.__ReasonOfFailure = null;
                if (__ctx1__ != null)
                    __ctx1__.__tempString = null;
                if (__ctx1__ != null)
                    __ctx1__.__tempXmlDoc = null;
                if (__ctx1__ != null)
                    __ctx1__.__ExceptionDescription = null;
                if (__ctx1__ != null)
                    __ctx1__.__InnerExceptionDescription = null;
                if (__ctx1__ != null && __ctx1__.__ErrMsg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__ErrMsg);
                    __ctx1__.__ErrMsg = null;
                }
                if (__ctx1__ != null && __ctx1__.__Context != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = null;
                }
                if (SQLUpdateNodeStatusPort != null)
                {
                    SQLUpdateNodeStatusPort.Close(__ctx1__, __seg__);
                    SQLUpdateNodeStatusPort = null;
                }
                Tracker.FireEvent(__eventLocations[20],__eventData[12],_stateMgrs[1].TrackDataStream );
                __ctx2__.Finally();
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 14;
            case 14:
                if ( !PreProgressInc( __seg__, __ctx__, 15 ) )
                    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 15;
            case 15:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 16 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 16;
            case 16:
                if ( !PreProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 17;
            case 17:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #33
0
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Envelope __msgEnv__ = null;
            bool __condition__;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[1];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __EAIProcess_root_0 __ctx0__ = (__EAIProcess_root_0)_stateMgrs[0];
            __EAIProcess_1 __ctx1__ = (__EAIProcess_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!ReceivePort.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__RequestMessage != null)
                    __ctx1__.UnrefMessage(__ctx1__.__RequestMessage);
                __ctx1__.__RequestMessage = new __messagetype_EAISchemas_Request("RequestMessage", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__RequestMessage);
                ReceivePort.ReceiveMessage(0, __msgEnv__, __ctx1__.__RequestMessage, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (ReceivePort != null)
                {
                    ReceivePort.Close(__ctx1__, __seg__);
                    ReceivePort = 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__.__RequestMessage);
                    __edata.PortName = @"ReceivePort";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[3],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                __condition__ = (System.Decimal)__ctx1__.__RequestMessage.GetPropertyValueThrows(typeof(EAISchemas.PropertySchema.GrandTotal)) > 10000;
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 15 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 15;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[4],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                {
                    __messagetype_EAISchemas_RequestDecline __RequestDeclineMessage = new __messagetype_EAISchemas_RequestDecline("RequestDeclineMessage", __ctx1__);

                    ApplyTransform(typeof(EAISchemas.MapToReqDecline), new object[] {__RequestDeclineMessage.part}, new object[] {__ctx1__.__RequestMessage.part});

                    if (__ctx1__.__RequestDeclineMessage != null)
                        __ctx1__.UnrefMessage(__ctx1__.__RequestDeclineMessage);
                    __ctx1__.__RequestDeclineMessage = __RequestDeclineMessage;
                    __ctx1__.RefMessage(__ctx1__.__RequestDeclineMessage);
                }
                __ctx1__.__RequestDeclineMessage.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    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__.__RequestDeclineMessage);
                    __edata.Messages.Add(__ctx1__.__RequestMessage);
                    Tracker.FireEvent(__eventLocations[5],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 10;
            case 10:
                if ( !PreProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[6],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 11;
            case 11:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                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;
                Decline.SendMessage(0, __ctx1__.__RequestDeclineMessage, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 13;
            case 13:
                if ( !PreProgressInc( __seg__, __ctx__, 14 ) )
                    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__.__RequestDeclineMessage);
                    __edata.PortName = @"Decline";
                    Tracker.FireEvent(__eventLocations[7],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__RequestDeclineMessage != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__RequestDeclineMessage);
                    __ctx1__.__RequestDeclineMessage = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 14;
            case 14:
                if ( !PostProgressInc( __seg__, __ctx__, 19 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 19;
            case 15:
                if ( !PreProgressInc( __seg__, __ctx__, 16 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[8],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 16;
            case 16:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 17;
            case 17:
                if ( !PreProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                SendERPPort.SendMessage(0, __ctx1__.__RequestMessage, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 18;
            case 18:
                if ( !PreProgressInc( __seg__, __ctx__, 19 ) )
                    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__.__RequestMessage);
                    __edata.PortName = @"SendERPPort";
                    Tracker.FireEvent(__eventLocations[9],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 19;
            case 19:
                if ( !PreProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null && __ctx1__.__RequestMessage != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__RequestMessage);
                    __ctx1__.__RequestMessage = null;
                }
                if (SendERPPort != null)
                {
                    SendERPPort.Close(__ctx1__, __seg__);
                    SendERPPort = null;
                }
                if (Decline != null)
                {
                    Decline.Close(__ctx1__, __seg__);
                    Decline = null;
                }
                Tracker.FireEvent(__eventLocations[10],__eventData[5],_stateMgrs[1].TrackDataStream );
                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[11],__eventData[6],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 21;
            case 21:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                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;
                __ctx1__.OnCommit();
                goto case 23;
            case 23:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
        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];
            __CreateGuard_1 __ctx1__ = (__CreateGuard_1)_stateMgrs[1];
            ____scope35_2 __ctx2__ = (____scope35_2)_stateMgrs[2];
            __CreateGuard_root_0 __ctx0__ = (__CreateGuard_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__CreateGuardException = default(System.Exception);
                __ctx1__.__NodeId = default(System.Int64);
                __ctx1__.__StatusId = default(System.Int32);
                __ctx1__.__ReasonOfFailure = default(System.String);
                __ctx1__.__ExceptionDescription = default(System.String);
                __ctx1__.__InnerExceptionDescription = default(System.String);
                __ctx1__.__tempXmlDoc = new Microsoft.XLANGs.RuntimeTypes.XmlDocumentSerializationProxy();
                __ctx1__.__returnCode = default(System.Int32);
                __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 (!RcvGuardNode.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__CreateGuardNodeMsg != null)
                    __ctx1__.UnrefMessage(__ctx1__.__CreateGuardNodeMsg);
                __ctx1__.__CreateGuardNodeMsg = new __messagetype_MedegaImport_Schemas_CreateGuardNode("CreateGuardNodeMsg", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__CreateGuardNodeMsg);
                RcvGuardNode.ReceiveMessage(0, __msgEnv__, __ctx1__.__CreateGuardNodeMsg, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (RcvGuardNode != null)
                {
                    RcvGuardNode.Close(__ctx1__, __seg__);
                    RcvGuardNode = 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__.__CreateGuardNodeMsg);
                    __edata.PortName = @"RcvGuardNode";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                __ctx1__.__CreateGuardException = new System.Exception();
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx1__.__ReasonOfFailure = "";
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                __ctx1__.__ExceptionDescription = "";
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                __ctx1__.__InnerExceptionDescription = "";
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                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_System_Xml_XmlDocument __Context = new __messagetype_System_Xml_XmlDocument("Context", __ctx1__);
                    IGuardService_CreateGuard_OutputMessage __CreateGuardResponse = new IGuardService_CreateGuard_OutputMessage("CreateGuardResponse", __ctx1__);

                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument.LoadXml("<empty/>");
                    __Context.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);
                    __CreateGuardResponse.parameters.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);
                    __ctx1__.__returnCode = 0;
                    __ctx1__.__ExceptionDescription = "";
                    __ctx1__.__ReasonOfFailure = "";
                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = __ctx1__.__CreateGuardNodeMsg.part.TypedValue;

                    if (__ctx1__.__Context != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = __Context;
                    __ctx1__.RefMessage(__ctx1__.__Context);
                    if (__ctx1__.__CreateGuardResponse != null)
                        __ctx1__.UnrefMessage(__ctx1__.__CreateGuardResponse);
                    __ctx1__.__CreateGuardResponse = __CreateGuardResponse;
                    __ctx1__.RefMessage(__ctx1__.__CreateGuardResponse);
                }
                __ctx1__.__Context.ConstructionCompleteEvent(false);
                __ctx1__.__CreateGuardResponse.ConstructionCompleteEvent(false);
                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__.__Context);
                    __edata.Messages.Add(__ctx1__.__CreateGuardResponse);
                    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[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 14;
            case 14:
                __ctx2__ = new ____scope35_2(this);
                _stateMgrs[2] = __ctx2__;
                if ( !PostProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 15;
            case 15:
                __ctx1__.StartContext(__seg__, __ctx2__);
                if ( !PostProgressInc( __seg__, __ctx__, 16 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 16:
                if ( !PreProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null)
                    __ctx1__.__tempXmlDoc = null;
                if (__ctx1__ != null)
                    __ctx1__.__InnerExceptionDescription = null;
                if (__ctx1__ != null)
                    __ctx1__.__ExceptionDescription = null;
                if (__ctx1__ != null)
                    __ctx1__.__ReasonOfFailure = null;
                if (__ctx1__ != null)
                    __ctx1__.__CreateGuardException = null;
                if (__ctx1__ != null && __ctx1__.__CreateGuardResponse != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__CreateGuardResponse);
                    __ctx1__.__CreateGuardResponse = null;
                }
                if (__ctx1__ != null && __ctx1__.__CreateGuardNodeMsg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__CreateGuardNodeMsg);
                    __ctx1__.__CreateGuardNodeMsg = null;
                }
                if (__ctx1__ != null && __ctx1__.__Context != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = null;
                }
                if (CreateGuardService != null)
                {
                    CreateGuardService.Close(__ctx1__, __seg__);
                    CreateGuardService = null;
                }
                Tracker.FireEvent(__eventLocations[34],__eventData[10],_stateMgrs[1].TrackDataStream );
                __ctx2__.Finally();
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 17;
            case 17:
                if ( !PreProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[3],__eventData[15],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 18;
            case 18:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 19 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 19;
            case 19:
                if ( !PreProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 20;
            case 20:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #35
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];
            __FF_Tab_Orch_1 __ctx1__ = (__FF_Tab_Orch_1)_stateMgrs[1];
            __FF_Tab_Orch_root_0 __ctx0__ = (__FF_Tab_Orch_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!FF_Tab.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__In_msg != null)
                    __ctx1__.UnrefMessage(__ctx1__.__In_msg);
                __ctx1__.__In_msg = new __messagetype_FF_To_Xml_FF_TAB("In_msg", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__In_msg);
                FF_Tab.ReceiveMessage(0, __msgEnv__, __ctx1__.__In_msg, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (FF_Tab != null)
                {
                    FF_Tab.Close(__ctx1__, __seg__);
                    FF_Tab = 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__.__In_msg);
                    __edata.PortName = @"FF_Tab";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[3],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                {
                    __messagetype_FF_To_Xml_FF_TAB __DummyMsg = new __messagetype_FF_To_Xml_FF_TAB("DummyMsg", __ctx1__);

                    __DummyMsg.CopyFrom(__ctx1__.__In_msg);
                    if (__ctx1__ != null && __ctx1__.__In_msg != null)
                    {
                        __ctx1__.UnrefMessage(__ctx1__.__In_msg);
                        __ctx1__.__In_msg = null;
                    }

                    if (__ctx1__.__DummyMsg != null)
                        __ctx1__.UnrefMessage(__ctx1__.__DummyMsg);
                    __ctx1__.__DummyMsg = __DummyMsg;
                    __ctx1__.RefMessage(__ctx1__.__DummyMsg);
                }
                __ctx1__.__DummyMsg.ConstructionCompleteEvent(false);
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    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__.__DummyMsg);
                    Tracker.FireEvent(__eventLocations[4],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                if ( !PreProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[5],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 9;
            case 9:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                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;
                FF_Tab_send.SendMessage(0, __ctx1__.__DummyMsg, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists );
                if (FF_Tab_send != null)
                {
                    FF_Tab_send.Close(__ctx1__, __seg__);
                    FF_Tab_send = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 11;
            case 11:
                if ( !PreProgressInc( __seg__, __ctx__, 12 ) )
                    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__.__DummyMsg);
                    __edata.PortName = @"FF_Tab_send";
                    Tracker.FireEvent(__eventLocations[6],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__DummyMsg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__DummyMsg);
                    __ctx1__.__DummyMsg = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 12;
            case 12:
                if ( !PreProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[7],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 13;
            case 13:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 14;
            case 14:
                if ( !PreProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 15;
            case 15:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
        public Microsoft.XLANGs.Core.StopConditions segment3(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Envelope __msgEnv__ = null;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[3];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[3];
            __CreateGuard_1 __ctx1__ = (__CreateGuard_1)_stateMgrs[1];
            ____scope35_2 __ctx2__ = (____scope35_2)_stateMgrs[2];
            __CreateGuard_root_0 __ctx0__ = (__CreateGuard_root_0)_stateMgrs[0];
            ____scope36_3 __ctx3__ = (____scope36_3)_stateMgrs[3];

            switch (__seg__.Progress)
            {
            case 0:
                __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[12],__eventData[4],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 2;
            case 2:
                if (!__ctx3__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 3 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 3;
            case 3:
                if ( !PreProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                CreateGuardService.SendMessage(0, __ctx1__.__CreateGuardRequest, null, null, out __ctx0__.__subWrapper1, __ctx3__, __seg__ );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                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.Send);
                    __edata.Messages.Add(__ctx1__.__CreateGuardRequest);
                    __edata.PortName = @"CreateGuardService";
                    Tracker.FireEvent(__eventLocations[13],__edata,_stateMgrs[3].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[14],__eventData[1],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                if (!CreateGuardService.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__.__CreateGuardResponse != null)
                    __ctx1__.UnrefMessage(__ctx1__.__CreateGuardResponse);
                __ctx1__.__CreateGuardResponse = new IGuardService_CreateGuard_OutputMessage("CreateGuardResponse", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__CreateGuardResponse);
                CreateGuardService.ReceiveMessage(0, __msgEnv__, __ctx1__.__CreateGuardResponse, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[3], __seg__);
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    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__.__CreateGuardResponse);
                    __edata.PortName = @"CreateGuardService";
                    Tracker.FireEvent(__eventLocations[15],__edata,_stateMgrs[3].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                if (!__ctx3__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx3__.OnCommit();
                goto case 10;
            case 10:
                __seg__.SegmentDone();
                _segments[2].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #37
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];
            __QuoteService_root_0          __ctx0__   = (__QuoteService_root_0)_stateMgrs[0];
            __QuoteService_1 __ctx1__ = (__QuoteService_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!Port_1.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__msgQuote != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgQuote);
                }
                __ctx1__.__msgQuote = new __messagetype_StockQuoteService_StockQuote("msgQuote", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__msgQuote);
                Port_1.ReceiveMessage(0, __msgEnv__, __ctx1__.__msgQuote, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                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__.__msgQuote);
                    __edata.PortName = @"Port_1";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                if (!PreProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[3], __eventData[2], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 6;

            case 6:
            {
                __messagetype_StockQuoteService_StockQuote __msgResponse = new __messagetype_StockQuoteService_StockQuote("msgResponse", __ctx1__);

                __msgResponse.CopyFrom(__ctx1__.__msgQuote);
                RootService.CommitStateManager.UserCodeCalled = true;
                __msgResponse.CopyContextPropertiesFrom(__ctx1__.__msgQuote);
                RootService.CommitStateManager.UserCodeCalled = true;
                if (__ctx1__ != null && __ctx1__.__msgQuote != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgQuote);
                    __ctx1__.__msgQuote = null;
                }
                __msgResponse.part.SetDistinguishedField("LastPrice", "29.29");
                RootService.CommitStateManager.UserCodeCalled = true;

                if (__ctx1__.__msgResponse != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgResponse);
                }
                __ctx1__.__msgResponse = __msgResponse;
                __ctx1__.RefMessage(__ctx1__.__msgResponse);
            }
                __ctx1__.__msgResponse.ConstructionCompleteEvent(false);
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    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__.__msgResponse);
                    Tracker.FireEvent(__eventLocations[4], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                Port_1.SendMessage(0, __ctx1__.__msgResponse, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (Port_1 != null)
                {
                    Port_1.Close(__ctx1__, __seg__);
                    Port_1 = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingResp) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingResp);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    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__.__msgResponse);
                    __edata.PortName = @"Port_1";
                    Tracker.FireEvent(__eventLocations[6], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__msgResponse != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgResponse);
                    __ctx1__.__msgResponse = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 12;

            case 12:
                if (!PreProgressInc(__seg__, __ctx__, 13))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[7], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 13;

            case 13:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 14))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 14;

            case 14:
                if (!PreProgressInc(__seg__, __ctx__, 15))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 15;

            case 15:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[1];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __HandleException_1 __ctx1__ = (__HandleException_1)_stateMgrs[1];
            __HandleException_root_0 __ctx0__ = (__HandleException_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__errorCode = (System.Int32)Args[0];
                __ctx1__.__ExceptionDescription = (System.String)Args[3];
                __ctx1__.__InnerExceptionDescription = (System.String)Args[4];
                __ctx1__.__Context = new __messagetype_System_Xml_XmlDocument("Context", __ctx1__);
                __ctx1__.__Context.CopyFrom((Microsoft.XLANGs.Core.XMessage)Args[1]);
                __ctx1__.RefMessage(__ctx1__.__Context);
                __ctx1__.__Context.ConstructionCompleteEvent();
                __ctx1__.__ErrMsg = new __messagetype_System_Xml_XmlDocument("ErrMsg", __ctx1__);
                __ctx1__.__ErrMsg.CopyFrom((Microsoft.XLANGs.Core.XMessage)Args[2]);
                __ctx1__.RefMessage(__ctx1__.__ErrMsg);
                __ctx1__.__ErrMsg.ConstructionCompleteEvent();
                if ( !PostProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 1;
            case 1:
                __ctx__.PrologueCompleted = true;
                if ( !PostProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                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 ( !PreProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[2],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 4;
            case 4:
                System.Diagnostics.EventLog.WriteEntry("RIZIV-INAMI.MedegaImport", System.String.Format("An error occured! Error code returned : {0}\r\nDescription: {1}\r\nInnerException: {2}", __ctx1__.__errorCode, __ctx1__.__ExceptionDescription, __ctx1__.__InnerExceptionDescription), System.Diagnostics.EventLogEntryType.Error);
                if ( !PostProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[3],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                if ( !PreProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[4],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 7;
            case 7:
                {
                    ExceptionType __MailError = new ExceptionType("MailError", __ctx1__);

                    __MailError.Context.CopyFrom(__ctx1__.__Context.part);
                    __MailError.ErrMsg.CopyFrom(__ctx1__.__ErrMsg.part);
                    __MailError.ErrText.LoadFrom("Error: " + __ctx1__.__ExceptionDescription + "\n" + __ctx1__.__InnerExceptionDescription);
                    if (__ctx1__ != null)
                        __ctx1__.__InnerExceptionDescription = null;
                    if (__ctx1__ != null)
                        __ctx1__.__ExceptionDescription = null;

                    if (__ctx1__.__MailError != null)
                        __ctx1__.UnrefMessage(__ctx1__.__MailError);
                    __ctx1__.__MailError = __MailError;
                    __ctx1__.RefMessage(__ctx1__.__MailError);
                }
                __ctx1__.__MailError.ConstructionCompleteEvent(false);
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                if ( !PreProgressInc( __seg__, __ctx__, 9 ) )
                    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__.__MailError);
                    Tracker.FireEvent(__eventLocations[5],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[6],__eventData[5],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 10;
            case 10:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 11:
                if ( !PreProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                SendErrContext.SendMessage(0, __ctx1__.__MailError, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.None );
                if (SendErrContext != null)
                {
                    SendErrContext.Close(__ctx1__, __seg__);
                    SendErrContext = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                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.Send);
                    __edata.Messages.Add(__ctx1__.__MailError);
                    __edata.PortName = @"SendErrContext";
                    Tracker.FireEvent(__eventLocations[7],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__MailError != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__MailError);
                    __ctx1__.__MailError = null;
                }
                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[8],__eventData[5],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 14;
            case 14:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                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;
                SendErrMsg.SendMessage(0, __ctx1__.__ErrMsg, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists );
                if (SendErrMsg != null)
                {
                    SendErrMsg.Close(__ctx1__, __seg__);
                    SendErrMsg = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 16;
            case 16:
                if ( !PreProgressInc( __seg__, __ctx__, 17 ) )
                    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__.__ErrMsg);
                    __edata.PortName = @"SendErrMsg";
                    Tracker.FireEvent(__eventLocations[9],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 17;
            case 17:
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Body);
                    __edata.Messages.Add(__ctx1__.__Context);
                    __edata.Messages.Add(__ctx1__.__ErrMsg);
                    Tracker.FireEvent(__eventLocations[0],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__ErrMsg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__ErrMsg);
                    __ctx1__.__ErrMsg = null;
                }
                if (__ctx1__ != null && __ctx1__.__Context != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = null;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 18;
            case 18:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 19 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 19;
            case 19:
                if ( !PreProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 20;
            case 20:
                Args[0] = __ctx1__.__errorCode;
                if ( !PostProgressInc( __seg__, __ctx__, 21 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 21;
            case 21:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #39
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];
            __ProcessPO_root_0             __ctx0__   = (__ProcessPO_root_0)_stateMgrs[0];
            __ProcessPO_1 __ctx1__ = (__ProcessPO_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!rcvPO.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__Po != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Po);
                }
                __ctx1__.__Po = new __messagetype_AFZA_PO_REST_PurchaseOrder("Po", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__Po);
                rcvPO.ReceiveMessage(0, __msgEnv__, __ctx1__.__Po, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                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__.__Po);
                    __edata.PortName = @"rcvPO";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                if (!PreProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[3], __eventData[2], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 6;

            case 6:
            {
                __messagetype_AFZA_PO_REST_POResponse __PORersp = new __messagetype_AFZA_PO_REST_POResponse("PORersp", __ctx1__);

                ApplyTransform(typeof(AFZA.PO.REST.Transform), new object[] { __PORersp.part }, new object[] { __ctx1__.__Po.part });

                if (__ctx1__.__PORersp != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__PORersp);
                }
                __ctx1__.__PORersp = __PORersp;
                __ctx1__.RefMessage(__ctx1__.__PORersp);
            }
                __ctx1__.__PORersp.ConstructionCompleteEvent(true);
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    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__.__PORersp);
                    __edata.Messages.Add(__ctx1__.__Po);
                    Tracker.FireEvent(__eventLocations[4], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__Po != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Po);
                    __ctx1__.__Po = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                rcvPO.SendMessage(0, __ctx1__.__PORersp, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (rcvPO != null)
                {
                    rcvPO.Close(__ctx1__, __seg__);
                    rcvPO = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingResp) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingResp);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    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__.__PORersp);
                    __edata.PortName = @"rcvPO";
                    Tracker.FireEvent(__eventLocations[6], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__PORersp != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__PORersp);
                    __ctx1__.__PORersp = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 12;

            case 12:
                if (!PreProgressInc(__seg__, __ctx__, 13))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[7], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 13;

            case 13:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 14))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 14;

            case 14:
                if (!PreProgressInc(__seg__, __ctx__, 15))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 15;

            case 15:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[1];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            ____scope37_2 __ctx2__ = (____scope37_2)_stateMgrs[2];
            __subImportFile_1 __ctx1__ = (__subImportFile_1)_stateMgrs[1];
            __subImportFile_root_0 __ctx0__ = (__subImportFile_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__GuardsFile = new __messagetype_MedegaImportSchema_Schemas_Medega_Guard("GuardsFile", __ctx1__);
                __ctx1__.__GuardsFile.CopyFrom((Microsoft.XLANGs.Core.XMessage)Args[2]);
                __ctx1__.RefMessage(__ctx1__.__GuardsFile);
                __ctx1__.__GuardsFile.ConstructionCompleteEvent();
                __ctx1__.__SQLCreateMedegaFileResponse = null;
                if ( !PostProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 1;
            case 1:
                __ctx1__.__ExceptionDescription = default(System.String);
                __ctx1__.__InnerExceptionDescription = default(System.String);
                __ctx1__.__ImportFileException = default(System.Exception);
                __ctx1__.__tempXmlDoc = new Microsoft.XLANGs.RuntimeTypes.XmlDocumentSerializationProxy();
                __ctx1__.__receivedFileName = default(System.String);
                __ctx1__.__tmpString = default(System.String);
                __ctx1__.__status = default(System.Int32);
                __ctx1__.__FileID = default(System.Int32);
                __ctx1__.__FileStatusID = default(System.Int32);
                __ctx__.PrologueCompleted = true;
                if ( !PostProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                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:
                __ctx1__.__ExceptionDescription = "";
                if ( !PostProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 4;
            case 4:
                __ctx1__.__InnerExceptionDescription = "";
                if ( !PostProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 5;
            case 5:
                __ctx1__.__ImportFileException = new System.Exception();
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                __ctx1__.__receivedFileName = "";
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                __ctx1__.__tmpString = "";
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[2],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 10;
            case 10:
                {
                    __messagetype_System_Xml_XmlDocument __Context = new __messagetype_System_Xml_XmlDocument("Context", __ctx1__);
                    __messagetype_System_Xml_XmlDocument __ExceptionMsg = new __messagetype_System_Xml_XmlDocument("ExceptionMsg", __ctx1__);
                    CreateMedegaFileResponse __SQLCreateMedegaFileResponse = new CreateMedegaFileResponse("SQLCreateMedegaFileResponse", __ctx1__);

                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument.LoadXml("<empty/>");
                    __Context.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);
                    __ExceptionMsg.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);
                    __SQLCreateMedegaFileResponse.parameters.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);

                    if (__ctx1__.__Context != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = __Context;
                    __ctx1__.RefMessage(__ctx1__.__Context);
                    if (__ctx1__.__ExceptionMsg != null)
                        __ctx1__.UnrefMessage(__ctx1__.__ExceptionMsg);
                    __ctx1__.__ExceptionMsg = __ExceptionMsg;
                    __ctx1__.RefMessage(__ctx1__.__ExceptionMsg);
                    if (__ctx1__.__SQLCreateMedegaFileResponse != null)
                        __ctx1__.UnrefMessage(__ctx1__.__SQLCreateMedegaFileResponse);
                    __ctx1__.__SQLCreateMedegaFileResponse = __SQLCreateMedegaFileResponse;
                    __ctx1__.RefMessage(__ctx1__.__SQLCreateMedegaFileResponse);
                }
                __ctx1__.__Context.ConstructionCompleteEvent(false);
                __ctx1__.__ExceptionMsg.ConstructionCompleteEvent(false);
                __ctx1__.__SQLCreateMedegaFileResponse.ConstructionCompleteEvent(false);
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 11:
                if ( !PreProgressInc( __seg__, __ctx__, 12 ) )
                    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__.__Context);
                    __edata.Messages.Add(__ctx1__.__ExceptionMsg);
                    __edata.Messages.Add(__ctx1__.__SQLCreateMedegaFileResponse);
                    Tracker.FireEvent(__eventLocations[3],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 12;
            case 12:
                if ( !PreProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[4],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 13;
            case 13:
                __ctx1__.__status = -99;
                if ( !PostProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 14;
            case 14:
                if ( !PreProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[5],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 15;
            case 15:
                __ctx1__.__FileStatusID = -1;
                if ( !PostProgressInc( __seg__, __ctx__, 16 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 16;
            case 16:
                __ctx1__.__FileID = 0;
                if ( !PostProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 17;
            case 17:
                if ( !PreProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[6],__eventData[5],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 18;
            case 18:
                __ctx2__ = new ____scope37_2(this);
                _stateMgrs[2] = __ctx2__;
                if ( !PostProgressInc( __seg__, __ctx__, 19 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 19;
            case 19:
                __ctx1__.StartContext(__seg__, __ctx2__);
                if ( !PostProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 20:
                if ( !PreProgressInc( __seg__, __ctx__, 21 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null)
                    __ctx1__.__tmpString = null;
                if (__ctx1__ != null)
                    __ctx1__.__receivedFileName = null;
                if (__ctx1__ != null)
                    __ctx1__.__tempXmlDoc = null;
                if (__ctx1__ != null)
                    __ctx1__.__ImportFileException = null;
                if (__ctx1__ != null)
                    __ctx1__.__InnerExceptionDescription = null;
                if (__ctx1__ != null)
                    __ctx1__.__ExceptionDescription = null;
                if (__ctx1__ != null && __ctx1__.__ExceptionMsg != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__ExceptionMsg);
                    __ctx1__.__ExceptionMsg = null;
                }
                if (__ctx1__ != null && __ctx1__.__Context != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = null;
                }
                if (CreateMedegaFile != null)
                {
                    CreateMedegaFile.Close(__ctx1__, __seg__);
                    CreateMedegaFile = null;
                }
                Tracker.FireEvent(__eventLocations[38],__eventData[13],_stateMgrs[1].TrackDataStream );
                __ctx2__.Finally();
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 21;
            case 21:
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Body);
                    __edata.Messages.Add(__ctx1__.__GuardsFile);
                    __edata.Messages.Add(__ctx1__.__SQLCreateMedegaFileResponse);
                    Tracker.FireEvent(__eventLocations[0],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__GuardsFile != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__GuardsFile);
                    __ctx1__.__GuardsFile = null;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 22 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 22;
            case 22:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 23 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 23;
            case 23:
                if ( !PreProgressInc( __seg__, __ctx__, 24 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 24;
            case 24:
                Args[0] = __ctx1__.__FileID;
                Args[1] = __ctx1__.__FileStatusID;
                ((Microsoft.XLANGs.Core.MessageTuple)(Args[3])).message = __ctx1__.__SQLCreateMedegaFileResponse;
                ((Microsoft.XLANGs.Core.MessageTuple)(Args[3])).context.RefMessage(__ctx1__.__SQLCreateMedegaFileResponse);
                if ( !PostProgressInc( __seg__, __ctx__, 25 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 25;
            case 25:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #41
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];
            __ProcessNAVOrder_root_0 __ctx0__ = (__ProcessNAVOrder_root_0)_stateMgrs[0];
            __ProcessNAVOrder_1 __ctx1__ = (__ProcessNAVOrder_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!NAVOrderRP.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__NAVOrder != null)
                    __ctx1__.UnrefMessage(__ctx1__.__NAVOrder);
                __ctx1__.__NAVOrder = new __messagetype_qbq_windeln_edi_NAVconnect_Fulfillment("NAVOrder", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__NAVOrder);
                NAVOrderRP.ReceiveMessage(0, __msgEnv__, __ctx1__.__NAVOrder, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (NAVOrderRP != null)
                {
                    NAVOrderRP.Close(__ctx1__, __seg__);
                    NAVOrderRP = 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__.__NAVOrder);
                    __edata.PortName = @"NAVOrderRP";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[3],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                {
                    __messagetype_qbq_windeln_edi_EFACT_D96A_ORDERS __EDIOrder = new __messagetype_qbq_windeln_edi_EFACT_D96A_ORDERS("EDIOrder", __ctx1__);

                    ApplyTransform(typeof(qbq.windeln.edi.NAVPurchaseOrder_To_EDIOrdersD96A), new object[] {__EDIOrder.part}, new object[] {__ctx1__.__NAVOrder.part});

                    if (__ctx1__.__EDIOrder != null)
                        __ctx1__.UnrefMessage(__ctx1__.__EDIOrder);
                    __ctx1__.__EDIOrder = __EDIOrder;
                    __ctx1__.RefMessage(__ctx1__.__EDIOrder);
                }
                __ctx1__.__EDIOrder.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    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__.__EDIOrder);
                    __edata.Messages.Add(__ctx1__.__NAVOrder);
                    Tracker.FireEvent(__eventLocations[4],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__NAVOrder != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__NAVOrder);
                    __ctx1__.__NAVOrder = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                if ( !PreProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[5],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 9;
            case 9:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                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;
                EDIOrderSP.SendMessage(0, __ctx1__.__EDIOrder, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists );
                if (EDIOrderSP != null)
                {
                    EDIOrderSP.Close(__ctx1__, __seg__);
                    EDIOrderSP = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 11;
            case 11:
                if ( !PreProgressInc( __seg__, __ctx__, 12 ) )
                    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__.__EDIOrder);
                    __edata.PortName = @"EDIOrderSP";
                    Tracker.FireEvent(__eventLocations[6],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__EDIOrder != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__EDIOrder);
                    __ctx1__.__EDIOrder = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 12;
            case 12:
                if ( !PreProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[7],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 13;
            case 13:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 14;
            case 14:
                if ( !PreProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 15;
            case 15:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
        public Microsoft.XLANGs.Core.StopConditions segment3(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Envelope __msgEnv__ = null;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[3];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[3];
            ____scope37_2 __ctx2__ = (____scope37_2)_stateMgrs[2];
            __subImportFile_1 __ctx1__ = (__subImportFile_1)_stateMgrs[1];
            ____scope38_3 __ctx3__ = (____scope38_3)_stateMgrs[3];
            __subImportFile_root_0 __ctx0__ = (__subImportFile_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __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[15],__eventData[8],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 2;
            case 2:
                if (!__ctx3__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 3 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 3;
            case 3:
                if ( !PreProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                CreateMedegaFile.SendMessage(0, __ctx1__.__SQLCreateMedegaFileRequest, null, null, out __ctx0__.__subWrapper0, __ctx3__, __seg__ );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                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.Send);
                    __edata.Messages.Add(__ctx1__.__SQLCreateMedegaFileRequest);
                    __edata.PortName = @"CreateMedegaFile";
                    Tracker.FireEvent(__eventLocations[16],__edata,_stateMgrs[3].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[17],__eventData[9],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                if (!CreateMedegaFile.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__, _locations[0]))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx0__ != null && __ctx0__.__subWrapper0 != null)
                {
                    __ctx0__.__subWrapper0.Destroy(this, __ctx0__);
                    __ctx0__.__subWrapper0 = null;
                }
                if (__ctx1__.__SQLCreateMedegaFileResponse != null)
                    __ctx1__.UnrefMessage(__ctx1__.__SQLCreateMedegaFileResponse);
                __ctx1__.__SQLCreateMedegaFileResponse = new CreateMedegaFileResponse("SQLCreateMedegaFileResponse", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__SQLCreateMedegaFileResponse);
                CreateMedegaFile.ReceiveMessage(0, __msgEnv__, __ctx1__.__SQLCreateMedegaFileResponse, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[3], __seg__);
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    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__.__SQLCreateMedegaFileResponse);
                    __edata.PortName = @"CreateMedegaFile";
                    Tracker.FireEvent(__eventLocations[18],__edata,_stateMgrs[3].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                if ( !PreProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[19],__eventData[3],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 9;
            case 9:
                __ctx2__.__xpathString = "number(//*[local-name()='FileId'])";
                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[20],__eventData[4],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 11;
            case 11:
                __ctx1__.__FileID = System.Convert.ToInt32(Microsoft.XLANGs.Core.Part.XPathLoad(__ctx1__.__SQLCreateMedegaFileResponse.parameters, __ctx2__.__xpathString, typeof(System.Object)));
                if ( !PostProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 12;
            case 12:
                __ctx1__.__FileStatusID = __ctx1__.__status;
                if ( !PostProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 13;
            case 13:
                if ( !PreProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[22],__eventData[3],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 14;
            case 14:
                __ctx1__.__status = 0;
                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;
                Tracker.FireEvent(__eventLocations[23],__eventData[4],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 16;
            case 16:
                if (!__ctx3__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 17;
            case 17:
                if ( !PreProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx3__.OnCommit();
                goto case 18;
            case 18:
                __seg__.SegmentDone();
                _segments[2].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #43
0
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Envelope __msgEnv__ = null;
            bool __condition__;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[1];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __SZDASN_Orchestration_root_0 __ctx0__ = (__SZDASN_Orchestration_root_0)_stateMgrs[0];
            __SZDASN_Orchestration_1 __ctx1__ = (__SZDASN_Orchestration_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__SubmitRNIF = default(Microsoft.Solutions.BTARN.Shared.SubmitRNIF);
                __ctx1__.__strPipMessageForSTX = default(System.String);
                __ctx1__.__strPipMessageFore2open = default(System.String);
                __ctx1__.__pipInstanceMessageIdForSTX = default(System.String);
                __ctx1__.__pipInstanceMessageIdFore2open = default(System.String);
                __ctx1__.__pipInstanceIdentifierForSTX = default(System.String);
                __ctx1__.__pipInstanceIdentifierFore2open = default(System.String);
                __ctx1__.__Increase = default(System.Int32);
                __ctx1__.__CountStr = default(System.String);
                __ctx1__.__Count = default(System.Int32);
                __ctx1__.__ASIC = default(System.Int32);
                __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 (!ReceiveOrderShipmentMessage.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__OrderShipmentMessage != null)
                    __ctx1__.UnrefMessage(__ctx1__.__OrderShipmentMessage);
                __ctx1__.__OrderShipmentMessage = new __messagetype_Kaifa_B2B_Schemas_Wms_OrderShipment("OrderShipmentMessage", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__OrderShipmentMessage);
                ReceiveOrderShipmentMessage.ReceiveMessage(0, __msgEnv__, __ctx1__.__OrderShipmentMessage, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (ReceiveOrderShipmentMessage != null)
                {
                    ReceiveOrderShipmentMessage.Close(__ctx1__, __seg__);
                    ReceiveOrderShipmentMessage = 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__.__OrderShipmentMessage);
                    __edata.PortName = @"ReceiveOrderShipmentMessage";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                __ctx1__.__SubmitRNIF = new Microsoft.Solutions.BTARN.Shared.SubmitRNIF();
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx1__.__strPipMessageForSTX = "";
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                __ctx1__.__strPipMessageFore2open = "";
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                __ctx1__.__pipInstanceMessageIdForSTX = "";
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                __ctx1__.__pipInstanceMessageIdFore2open = "";
                if ( !PostProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 10;
            case 10:
                __ctx1__.__pipInstanceIdentifierForSTX = "";
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 11:
                __ctx1__.__pipInstanceIdentifierFore2open = "";
                if ( !PostProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 12;
            case 12:
                __ctx1__.__CountStr = "";
                if ( !PostProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 13;
            case 13:
                if ( !PreProgressInc( __seg__, __ctx__, 14 ) )
                    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 14;
            case 14:
                __ctx1__.__ASIC = (System.Int32)Microsoft.XLANGs.Core.Part.XPathLoad(__ctx1__.__OrderShipmentMessage.part, "count(/*[local-name()='OrderShipment' and namespace-uri()='http://kaifa.b2b.schemas/OrderShipment']/*[local-name()='ASIC' and namespace-uri()='http://kaifa.b2b.schemas/OrderShipment'])", typeof(System.Int32));
                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;
                Tracker.FireEvent(__eventLocations[5],__eventData[3],_stateMgrs[1].TrackDataStream );
                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[6],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 17;
            case 17:
                __condition__ = __ctx1__.__ASIC > 0;
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 31 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 31;
                }
                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;
                Tracker.FireEvent(__eventLocations[7],__eventData[5],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 19;
            case 19:
                {
                    __messagetype_Kaifa_B2B_Schemas_RosettaNet_Pip3B2AdvanceShipmentNotification __Pip3B2MessageForSTX = new __messagetype_Kaifa_B2B_Schemas_RosettaNet_Pip3B2AdvanceShipmentNotification("Pip3B2MessageForSTX", __ctx1__);

                    ApplyTransform(typeof(Kaifa.B2B.SZD.Mapping.Order_To_3B2_STX_ASIC), new object[] {__Pip3B2MessageForSTX.part}, new object[] {__ctx1__.__OrderShipmentMessage.part});
                    __ctx1__.__pipInstanceIdentifierForSTX = (System.String)__Pip3B2MessageForSTX.part.GetDistinguishedField("thisDocumentIdentifier.ProprietaryDocumentIdentifier");
                    __Pip3B2MessageForSTX.SetPropertyValue(typeof(FILE.ReceivedFileName), "ASN_To_STX_" + __ctx1__.__pipInstanceIdentifierForSTX + ".xml");

                    if (__ctx1__.__Pip3B2MessageForSTX != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Pip3B2MessageForSTX);
                    __ctx1__.__Pip3B2MessageForSTX = __Pip3B2MessageForSTX;
                    __ctx1__.RefMessage(__ctx1__.__Pip3B2MessageForSTX);
                }
                __ctx1__.__Pip3B2MessageForSTX.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 20;
            case 20:
                if ( !PreProgressInc( __seg__, __ctx__, 21 ) )
                    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__.__Pip3B2MessageForSTX);
                    __edata.Messages.Add(__ctx1__.__OrderShipmentMessage);
                    Tracker.FireEvent(__eventLocations[8],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 21;
            case 21:
                if ( !PreProgressInc( __seg__, __ctx__, 22 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[9],__eventData[6],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 22;
            case 22:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 23 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 23;
            case 23:
                if ( !PreProgressInc( __seg__, __ctx__, 24 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                SendPip3B2Message.SendMessage(0, __ctx1__.__Pip3B2MessageForSTX, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.None );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 24;
            case 24:
                if ( !PreProgressInc( __seg__, __ctx__, 25 ) )
                    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__.__Pip3B2MessageForSTX);
                    __edata.PortName = @"SendPip3B2Message";
                    Tracker.FireEvent(__eventLocations[10],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 25;
            case 25:
                if ( !PreProgressInc( __seg__, __ctx__, 26 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[11],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 26;
            case 26:
                __ctx1__.__pipInstanceMessageIdForSTX = (System.String)__ctx1__.__Pip3B2MessageForSTX.GetPropertyValueThrows(typeof(BTS.MessageID));
                if ( !PostProgressInc( __seg__, __ctx__, 27 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 27;
            case 27:
                if ( !PreProgressInc( __seg__, __ctx__, 28 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[12],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 28;
            case 28:
                __ctx1__.__strPipMessageForSTX = Kaifa.B2B.Utility.HeaderHelper.ReturnSCWithDocType(__ctx1__.__Pip3B2MessageForSTX.part.TypedValue, "3B2SG0100");
                if (__ctx1__ != null && __ctx1__.__Pip3B2MessageForSTX != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Pip3B2MessageForSTX);
                    __ctx1__.__Pip3B2MessageForSTX = null;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 29 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 29;
            case 29:
                System.Diagnostics.Trace.WriteLine("SubmitRNIF.SubmitMessage To STX " + __ctx1__.__pipInstanceMessageIdForSTX + " - " + __ctx1__.__pipInstanceIdentifierForSTX, "kaifa.b2b");
                if ( !PostProgressInc( __seg__, __ctx__, 30 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 30;
            case 30:
                __ctx1__.__SubmitRNIF.SubmitMessage(Microsoft.Solutions.BTARN.Shared.MessageCategory.AsyncAction, "KAIFA", "SEAGATE-US", "3B2", __ctx1__.__pipInstanceIdentifierForSTX, "V01.00", __ctx1__.__strPipMessageForSTX);
                if ( !PostProgressInc( __seg__, __ctx__, 31 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 31;
            case 31:
                if ( !PreProgressInc( __seg__, __ctx__, 32 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null)
                    __ctx1__.__pipInstanceIdentifierForSTX = null;
                if (__ctx1__ != null)
                    __ctx1__.__pipInstanceMessageIdForSTX = null;
                if (__ctx1__ != null)
                    __ctx1__.__strPipMessageForSTX = null;
                Tracker.FireEvent(__eventLocations[13],__eventData[7],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 32;
            case 32:
                if ( !PreProgressInc( __seg__, __ctx__, 33 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[14],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 33;
            case 33:
                __ctx1__.__Count = (System.Int32)Microsoft.XLANGs.Core.Part.XPathLoad(__ctx1__.__OrderShipmentMessage.part, "count(/*[local-name()='OrderShipment' and namespace-uri()='http://kaifa.b2b.schemas/OrderShipment']/*[local-name()='VendorShipmentReport' and namespace-uri()='http://kaifa.b2b.schemas/OrderShipment'])", typeof(System.Int32));
                if ( !PostProgressInc( __seg__, __ctx__, 34 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 34;
            case 34:
                if ( !PreProgressInc( __seg__, __ctx__, 35 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[15],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 35;
            case 35:
                __ctx1__.__CountStr = __ctx1__.__Count.ToString();
                if ( !PostProgressInc( __seg__, __ctx__, 36 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 36;
            case 36:
                __ctx1__.__Increase = 1;
                if ( !PostProgressInc( __seg__, __ctx__, 37 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 37;
            case 37:
                if ( !PreProgressInc( __seg__, __ctx__, 38 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[16],__eventData[8],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 38;
            case 38:
                __condition__ = __ctx1__.__Increase <= __ctx1__.__Count;
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 61 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 61;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 39 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 39;
            case 39:
                if ( !PreProgressInc( __seg__, __ctx__, 40 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[16],__eventData[9],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 40;
            case 40:
                if ( !PreProgressInc( __seg__, __ctx__, 41 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[17],__eventData[5],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 41;
            case 41:
                {
                    __messagetype_Kaifa_B2B_Schemas_Wms_VendorShipmentReport __VendorShipmentReportMessage = new __messagetype_Kaifa_B2B_Schemas_Wms_VendorShipmentReport("VendorShipmentReportMessage", __ctx1__);

                    __ctx1__.__CountStr = __ctx1__.__Increase.ToString();
                    __VendorShipmentReportMessage.part.XPathAssign(__ctx1__.__OrderShipmentMessage.part, "/*[local-name()='OrderShipment' and namespace-uri()='http://kaifa.b2b.schemas/OrderShipment']/*[local-name()='VendorShipmentReport' and namespace-uri()='http://kaifa.b2b.schemas/OrderShipment'][" + __ctx1__.__CountStr + "]");

                    if (__ctx1__.__VendorShipmentReportMessage != null)
                        __ctx1__.UnrefMessage(__ctx1__.__VendorShipmentReportMessage);
                    __ctx1__.__VendorShipmentReportMessage = __VendorShipmentReportMessage;
                    __ctx1__.RefMessage(__ctx1__.__VendorShipmentReportMessage);
                }
                __ctx1__.__VendorShipmentReportMessage.ConstructionCompleteEvent(false);
                if ( !PostProgressInc( __seg__, __ctx__, 42 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 42;
            case 42:
                if ( !PreProgressInc( __seg__, __ctx__, 43 ) )
                    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__.__VendorShipmentReportMessage);
                    Tracker.FireEvent(__eventLocations[18],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 43;
            case 43:
                if ( !PreProgressInc( __seg__, __ctx__, 44 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[19],__eventData[5],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 44;
            case 44:
                {
                    __messagetype_Kaifa_B2B_Schemas_RosettaNet_Pip3B2AdvanceShipmentNotification __Pip3B2MessageForE2open = new __messagetype_Kaifa_B2B_Schemas_RosettaNet_Pip3B2AdvanceShipmentNotification("Pip3B2MessageForE2open", __ctx1__);

                    ApplyTransform(typeof(Kaifa.B2B.SZD.Mapping.Order_To_3B2_e2open), new object[] {__Pip3B2MessageForE2open.part}, new object[] {__ctx1__.__VendorShipmentReportMessage.part});
                    __ctx1__.__pipInstanceIdentifierFore2open = (System.String)__Pip3B2MessageForE2open.part.GetDistinguishedField("thisDocumentIdentifier.ProprietaryDocumentIdentifier");
                    __Pip3B2MessageForE2open.SetPropertyValue(typeof(FILE.ReceivedFileName), "ASN_To_e2open_" + __ctx1__.__pipInstanceIdentifierFore2open + ".xml");

                    if (__ctx1__.__Pip3B2MessageForE2open != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Pip3B2MessageForE2open);
                    __ctx1__.__Pip3B2MessageForE2open = __Pip3B2MessageForE2open;
                    __ctx1__.RefMessage(__ctx1__.__Pip3B2MessageForE2open);
                }
                __ctx1__.__Pip3B2MessageForE2open.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 45 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 45;
            case 45:
                if ( !PreProgressInc( __seg__, __ctx__, 46 ) )
                    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__.__Pip3B2MessageForE2open);
                    __edata.Messages.Add(__ctx1__.__VendorShipmentReportMessage);
                    Tracker.FireEvent(__eventLocations[20],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__VendorShipmentReportMessage != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__VendorShipmentReportMessage);
                    __ctx1__.__VendorShipmentReportMessage = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 46;
            case 46:
                if ( !PreProgressInc( __seg__, __ctx__, 47 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[21],__eventData[6],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 47;
            case 47:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 48 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 48;
            case 48:
                if ( !PreProgressInc( __seg__, __ctx__, 49 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                SendPip3B2Message.SendMessage(0, __ctx1__.__Pip3B2MessageForE2open, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.None );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 49;
            case 49:
                if ( !PreProgressInc( __seg__, __ctx__, 50 ) )
                    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__.__Pip3B2MessageForE2open);
                    __edata.PortName = @"SendPip3B2Message";
                    Tracker.FireEvent(__eventLocations[22],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 50;
            case 50:
                if ( !PreProgressInc( __seg__, __ctx__, 51 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[23],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 51;
            case 51:
                __ctx1__.__pipInstanceMessageIdFore2open = (System.String)__ctx1__.__Pip3B2MessageForE2open.GetPropertyValueThrows(typeof(BTS.MessageID));
                if ( !PostProgressInc( __seg__, __ctx__, 52 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 52;
            case 52:
                if ( !PreProgressInc( __seg__, __ctx__, 53 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[24],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 53;
            case 53:
                __ctx1__.__strPipMessageFore2open = Kaifa.B2B.Utility.HeaderHelper.ReturnSCWithDocType(__ctx1__.__Pip3B2MessageForE2open.part.TypedValue, "3B2SG0100");
                if (__ctx1__ != null && __ctx1__.__Pip3B2MessageForE2open != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__Pip3B2MessageForE2open);
                    __ctx1__.__Pip3B2MessageForE2open = null;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 54 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 54;
            case 54:
                System.Diagnostics.Trace.WriteLine("SubmitRNIF.SubmitMessage To e2open " + __ctx1__.__pipInstanceMessageIdFore2open + " - " + __ctx1__.__pipInstanceIdentifierFore2open, "kaifa.b2b");
                if ( !PostProgressInc( __seg__, __ctx__, 55 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 55;
            case 55:
                __ctx1__.__SubmitRNIF.SubmitMessage(Microsoft.Solutions.BTARN.Shared.MessageCategory.AsyncAction, "KAIFA", "E2OPEN", "3B2", __ctx1__.__pipInstanceIdentifierFore2open, "V01.00", __ctx1__.__strPipMessageFore2open);
                if ( !PostProgressInc( __seg__, __ctx__, 56 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 56;
            case 56:
                if ( !PreProgressInc( __seg__, __ctx__, 57 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[25],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 57;
            case 57:
                __ctx1__.__Increase = __ctx1__.__Increase + 1;
                if ( !PostProgressInc( __seg__, __ctx__, 58 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 58;
            case 58:
                if ( !PreProgressInc( __seg__, __ctx__, 59 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[26],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 59;
            case 59:
                if ( !PreProgressInc( __seg__, __ctx__, 60 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[27],__eventData[10],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 60;
            case 60:
                if ( !PostProgressInc( __seg__, __ctx__, 38 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 38;
            case 61:
                if ( !PreProgressInc( __seg__, __ctx__, 62 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null)
                    __ctx1__.__CountStr = null;
                if (__ctx1__ != null)
                    __ctx1__.__pipInstanceIdentifierFore2open = null;
                if (__ctx1__ != null)
                    __ctx1__.__pipInstanceMessageIdFore2open = null;
                if (__ctx1__ != null)
                    __ctx1__.__strPipMessageFore2open = null;
                if (__ctx1__ != null)
                    __ctx1__.__SubmitRNIF = null;
                if (__ctx1__ != null && __ctx1__.__OrderShipmentMessage != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__OrderShipmentMessage);
                    __ctx1__.__OrderShipmentMessage = null;
                }
                if (SendPip3B2Message != null)
                {
                    SendPip3B2Message.Close(__ctx1__, __seg__);
                    SendPip3B2Message = null;
                }
                Tracker.FireEvent(__eventLocations[27],__eventData[11],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 62;
            case 62:
                if ( !PreProgressInc( __seg__, __ctx__, 63 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[3],__eventData[12],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 63;
            case 63:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 64 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 64;
            case 64:
                if ( !PreProgressInc( __seg__, __ctx__, 65 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 65;
            case 65:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
        public Microsoft.XLANGs.Core.StopConditions segment5(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[5];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[2];
            ____scope37_2 __ctx2__ = (____scope37_2)_stateMgrs[2];
            __subImportFile_1 __ctx1__ = (__subImportFile_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                OnBeginCatchHandler(2);
                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[30],__eventData[10],_stateMgrs[2].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[31],__eventData[3],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 3;
            case 3:
                __ctx1__.__ExceptionDescription = __ctx2__.__ex_0.Message;
                if (__ctx2__ != null)
                    __ctx2__.__ex_0 = 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;
                Tracker.FireEvent(__eventLocations[32],__eventData[4],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                __ctx1__.__InnerExceptionDescription = "";
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx1__.__FileStatusID = -99;
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[35],__eventData[14],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                {
                    Microsoft.XLANGs.Core.Service svc = new MedegaImport.HandleException(4, InstanceId, this);
                    _stateMgrs[4] = svc;
                    __ctx2__.StartCall(__seg__, svc, __eventLocations[35],new object[] {__ctx1__.__status, __ctx1__.__Context, __ctx1__.__ExceptionMsg, __ctx1__.__ExceptionDescription, __ctx1__.__InnerExceptionDescription});
                }
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    object[] args = ((Microsoft.XLANGs.Core.Service)_stateMgrs[4]).Args;
                    __ctx1__.__status = (System.Int32)args[0];
                }
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Call);
                    __edata.Messages.Add(__ctx1__.__Context);
                    __edata.Messages.Add(__ctx1__.__ExceptionMsg);
                    Tracker.FireEvent(__eventLocations[36],__edata,_stateMgrs[2].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 10;
            case 10:
                if ( !PreProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[37],__eventData[12],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 11;
            case 11:
                __ctx2__.__exv__ = null;
                OnEndCatchHandler(2, __seg__);
                __seg__.SegmentDone();
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #45
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];
            __MapTestOrchestration_1       __ctx1__   = (__MapTestOrchestration_1)_stateMgrs[1];
            __MapTestOrchestration_root_0  __ctx0__   = (__MapTestOrchestration_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!ReceivePort.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__msgPessoa != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgPessoa);
                }
                __ctx1__.__msgPessoa = new __messagetype_ComoFuncinamOsMapas_Schemas_PessoaOrigem("msgPessoa", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__msgPessoa);
                ReceivePort.ReceiveMessage(0, __msgEnv__, __ctx1__.__msgPessoa, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (ReceivePort != null)
                {
                    ReceivePort.Close(__ctx1__, __seg__);
                    ReceivePort = 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__.__msgPessoa);
                    __edata.PortName = @"ReceivePort";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                if (!PreProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[3], __eventData[2], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 6;

            case 6:
            {
                __messagetype_ComoFuncinamOsMapas_Schemas_PessoaDestino __msgPessoaFinal = new __messagetype_ComoFuncinamOsMapas_Schemas_PessoaDestino("msgPessoaFinal", __ctx1__);

                ApplyTransform(typeof(ComoFuncinamOsMapas.MapasNetPonto.DemoNetPonto), new object[] { __msgPessoaFinal.part }, new object[] { __ctx1__.__msgPessoa.part });

                if (__ctx1__.__msgPessoaFinal != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgPessoaFinal);
                }
                __ctx1__.__msgPessoaFinal = __msgPessoaFinal;
                __ctx1__.RefMessage(__ctx1__.__msgPessoaFinal);
            }
                __ctx1__.__msgPessoaFinal.ConstructionCompleteEvent(true);
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    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__.__msgPessoaFinal);
                    __edata.Messages.Add(__ctx1__.__msgPessoa);
                    Tracker.FireEvent(__eventLocations[4], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__msgPessoa != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgPessoa);
                    __ctx1__.__msgPessoa = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                SendPort.SendMessage(0, __ctx1__.__msgPessoaFinal, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (SendPort != null)
                {
                    SendPort.Close(__ctx1__, __seg__);
                    SendPort = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingRqst);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    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__.__msgPessoaFinal);
                    __edata.PortName = @"SendPort";
                    Tracker.FireEvent(__eventLocations[6], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__msgPessoaFinal != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__msgPessoaFinal);
                    __ctx1__.__msgPessoaFinal = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 12;

            case 12:
                if (!PreProgressInc(__seg__, __ctx__, 13))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[7], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 13;

            case 13:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 14))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 14;

            case 14:
                if (!PreProgressInc(__seg__, __ctx__, 15))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 15;

            case 15:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }
        public Microsoft.XLANGs.Core.StopConditions segment4(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[4];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[3];
            __subImportGuardRecord_1 __ctx1__ = (__subImportGuardRecord_1)_stateMgrs[1];
            __Transaction_2_2 __ctx2__ = (__Transaction_2_2)_stateMgrs[2];
            ____scope39_3 __ctx3__ = (____scope39_3)_stateMgrs[3];

            switch (__seg__.Progress)
            {
            case 0:
                OnBeginCatchHandler(3);
                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[13],__eventData[6],_stateMgrs[3].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[14],__eventData[4],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 3;
            case 3:
                {
                    __messagetype_System_Xml_XmlDocument __ExceptionMsg = new __messagetype_System_Xml_XmlDocument("ExceptionMsg", __ctx2__);

                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument.LoadXml("<exc>" + __ctx3__.__exc_0.Message + "</exc>");
                    __ExceptionMsg.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);

                    if (__ctx2__.__ExceptionMsg != null)
                        __ctx2__.UnrefMessage(__ctx2__.__ExceptionMsg);
                    __ctx2__.__ExceptionMsg = __ExceptionMsg;
                    __ctx2__.RefMessage(__ctx2__.__ExceptionMsg);
                }
                __ctx2__.__ExceptionMsg.ConstructionCompleteEvent(false);
                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.Construct);
                    __edata.Messages.Add(__ctx2__.__ExceptionMsg);
                    Tracker.FireEvent(__eventLocations[15],__edata,_stateMgrs[3].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                if ( !PreProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[16],__eventData[2],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 6;
            case 6:
                __ctx2__.__ImportXmlException = __ctx3__.__exc_0;
                if (__ctx3__ != null)
                    __ctx3__.__exc_0 = null;
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[17],__eventData[3],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                __ctx2__.__returnCode = -99;
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[20],__eventData[7],_stateMgrs[3].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 10;
            case 10:
                __ctx3__.__exv__ = null;
                OnEndCatchHandler(3, __seg__);
                __seg__.SegmentDone();
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #47
0
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Envelope __msgEnv__ = null;
            bool __condition__;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[1];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __SZDSOI_Orchestration_root_0 __ctx0__ = (__SZDSOI_Orchestration_root_0)_stateMgrs[0];
            __SZDSOI_Orchestration_1 __ctx1__ = (__SZDSOI_Orchestration_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx1__.__SubmitRNIF1 = default(Microsoft.Solutions.BTARN.Shared.SubmitRNIF);
                __ctx1__.__strPipMessageFore2open = default(System.String);
                __ctx1__.__pipInstanceMessageIdFore2open = default(System.String);
                __ctx1__.__pipInstanceMessageIdForSTX = default(System.String);
                __ctx1__.__pipInstanceIdentifierFore2open = default(System.String);
                __ctx1__.__SubmitRNIF = default(Microsoft.Solutions.BTARN.Shared.SubmitRNIF);
                __ctx1__.__Increase = default(System.Int32);
                __ctx1__.__CountStr = default(System.String);
                __ctx1__.__Count = default(System.Int32);
                __ctx1__.__pipInstanceIdentifierForSTX = default(System.String);
                __ctx1__.__strPipMessageForSTX = default(System.String);
                __ctx1__.__SCHEDULELocation = 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 (!ReceiveInventoryMessage.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx1__.__InventoryReportMessage != null)
                    __ctx1__.UnrefMessage(__ctx1__.__InventoryReportMessage);
                __ctx1__.__InventoryReportMessage = new __messagetype_Kaifa_B2B_Schemas_Wms_InventoryReport("InventoryReportMessage", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__InventoryReportMessage);
                ReceiveInventoryMessage.ReceiveMessage(0, __msgEnv__, __ctx1__.__InventoryReportMessage, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (ReceiveInventoryMessage != null)
                {
                    ReceiveInventoryMessage.Close(__ctx1__, __seg__);
                    ReceiveInventoryMessage = 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__.__InventoryReportMessage);
                    __edata.PortName = @"ReceiveInventoryMessage";
                    Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                __ctx1__.__SubmitRNIF1 = new Microsoft.Solutions.BTARN.Shared.SubmitRNIF();
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx1__.__strPipMessageFore2open = "";
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 7;
            case 7:
                __ctx1__.__pipInstanceMessageIdFore2open = "";
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                __ctx1__.__pipInstanceMessageIdForSTX = "";
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                __ctx1__.__pipInstanceIdentifierFore2open = "";
                if ( !PostProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 10;
            case 10:
                __ctx1__.__SubmitRNIF = new Microsoft.Solutions.BTARN.Shared.SubmitRNIF();
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 11:
                __ctx1__.__CountStr = "";
                if ( !PostProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 12;
            case 12:
                __ctx1__.__pipInstanceIdentifierForSTX = "";
                if ( !PostProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 13;
            case 13:
                __ctx1__.__strPipMessageForSTX = "";
                if ( !PostProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 14;
            case 14:
                __ctx1__.__SCHEDULELocation = "";
                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;
                Tracker.FireEvent(__eventLocations[4],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 16;
            case 16:
                __ctx1__.__Count = (System.Int32)Microsoft.XLANGs.Core.Part.XPathLoad(__ctx1__.__InventoryReportMessage.part, "count(/*[local-name()='InventoryReport' and namespace-uri()='http://kaifa.b2b.schemas/InventoryReport']/*[local-name()='VendorInventoryReport' and namespace-uri()='http://kaifa.b2b.schemas/InventoryReport'])", typeof(System.Int32));
                if ( !PostProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 17;
            case 17:
                if ( !PreProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[5],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 18;
            case 18:
                __ctx1__.__CountStr = __ctx1__.__Count.ToString();
                if ( !PostProgressInc( __seg__, __ctx__, 19 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 19;
            case 19:
                __ctx1__.__Increase = 1;
                if ( !PostProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 20;
            case 20:
                if ( !PreProgressInc( __seg__, __ctx__, 21 ) )
                    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 21;
            case 21:
                __ctx1__.__SCHEDULELocation = (System.String)__ctx1__.__InventoryReportMessage.GetPropertyValueThrows(typeof(BTS.InboundTransportLocation));
                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;
                Tracker.FireEvent(__eventLocations[7],__eventData[3],_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[8],__eventData[4],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 24;
            case 24:
                __condition__ = __ctx1__.__Increase <= __ctx1__.__Count;
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 37 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 37;
                }
                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[8],__eventData[5],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 26;
            case 26:
                if ( !PreProgressInc( __seg__, __ctx__, 27 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[9],__eventData[6],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 27;
            case 27:
                {
                    __messagetype_Kaifa_B2B_Schemas_Wms_VendorInventoryReport __VendorReportMessage = new __messagetype_Kaifa_B2B_Schemas_Wms_VendorInventoryReport("VendorReportMessage", __ctx1__);

                    __ctx1__.__CountStr = __ctx1__.__Increase.ToString();
                    __VendorReportMessage.part.XPathAssign(__ctx1__.__InventoryReportMessage.part, "/*[local-name()='InventoryReport' and namespace-uri()='http://kaifa.b2b.schemas/InventoryReport']/*[local-name()='VendorInventoryReport' and namespace-uri()='http://kaifa.b2b.schemas/InventoryReport'][" + __ctx1__.__CountStr + "]");

                    if (__ctx1__.__VendorReportMessage != null)
                        __ctx1__.UnrefMessage(__ctx1__.__VendorReportMessage);
                    __ctx1__.__VendorReportMessage = __VendorReportMessage;
                    __ctx1__.RefMessage(__ctx1__.__VendorReportMessage);
                }
                __ctx1__.__VendorReportMessage.ConstructionCompleteEvent(false);
                if ( !PostProgressInc( __seg__, __ctx__, 28 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 28;
            case 28:
                if ( !PreProgressInc( __seg__, __ctx__, 29 ) )
                    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__.__VendorReportMessage);
                    Tracker.FireEvent(__eventLocations[10],__edata,_stateMgrs[1].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 29;
            case 29:
                if ( !PreProgressInc( __seg__, __ctx__, 30 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[11],__eventData[7],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 30;
            case 30:
                __seg__.RunSegments(new Microsoft.XLANGs.Core.Segment[] {_segments[2], _segments[3]}, this);
                if ( !PostProgressInc( __seg__, __ctx__, 31 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 31:
                if ( !PreProgressInc( __seg__, __ctx__, 32 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null && __ctx1__.__VendorReportMessage != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__VendorReportMessage);
                    __ctx1__.__VendorReportMessage = null;
                }
                Tracker.FireEvent(__eventLocations[12],__eventData[11],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 32;
            case 32:
                if ( !PreProgressInc( __seg__, __ctx__, 33 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[37],__eventData[2],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 33;
            case 33:
                __ctx1__.__Increase = __ctx1__.__Increase + 1;
                if ( !PostProgressInc( __seg__, __ctx__, 34 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 34;
            case 34:
                if ( !PreProgressInc( __seg__, __ctx__, 35 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[38],__eventData[3],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 35;
            case 35:
                if ( !PreProgressInc( __seg__, __ctx__, 36 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[39],__eventData[12],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 36;
            case 36:
                if ( !PostProgressInc( __seg__, __ctx__, 24 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 24;
            case 37:
                if ( !PreProgressInc( __seg__, __ctx__, 38 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null)
                    __ctx1__.__SCHEDULELocation = null;
                if (__ctx1__ != null)
                    __ctx1__.__strPipMessageForSTX = null;
                if (__ctx1__ != null)
                    __ctx1__.__pipInstanceIdentifierForSTX = null;
                if (__ctx1__ != null)
                    __ctx1__.__CountStr = null;
                if (__ctx1__ != null)
                    __ctx1__.__SubmitRNIF = null;
                if (__ctx1__ != null)
                    __ctx1__.__pipInstanceIdentifierFore2open = null;
                if (__ctx1__ != null)
                    __ctx1__.__pipInstanceMessageIdForSTX = null;
                if (__ctx1__ != null)
                    __ctx1__.__pipInstanceMessageIdFore2open = null;
                if (__ctx1__ != null)
                    __ctx1__.__strPipMessageFore2open = null;
                if (__ctx1__ != null)
                    __ctx1__.__SubmitRNIF1 = null;
                if (__ctx1__ != null && __ctx1__.__InventoryReportMessage != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__InventoryReportMessage);
                    __ctx1__.__InventoryReportMessage = null;
                }
                if (SendPip4C1Message != null)
                {
                    SendPip4C1Message.Close(__ctx1__, __seg__);
                    SendPip4C1Message = null;
                }
                Tracker.FireEvent(__eventLocations[39],__eventData[13],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 38;
            case 38:
                if ( !PreProgressInc( __seg__, __ctx__, 39 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[3],__eventData[14],_stateMgrs[1].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 39;
            case 39:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 40 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 40;
            case 40:
                if ( !PreProgressInc( __seg__, __ctx__, 41 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx1__.OnCommit();
                goto case 41;
            case 41:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
Beispiel #48
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;
        }
Beispiel #49
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];
            __ProcessInfo_1      __ctx1__             = (__ProcessInfo_1)_stateMgrs[1];
            __ProcessInfo_root_0 __ctx0__             = (__ProcessInfo_root_0)_stateMgrs[0];

            switch (__seg__.Progress)
            {
            case 0:
                __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 (!Test_Port.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (__ctx1__.__ResidentIn_Message != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__ResidentIn_Message);
                }
                __ctx1__.__ResidentIn_Message = new __messagetype_NBS_Biztalk_Schemas_Canonical_V1sd("ResidentIn_Message", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__ResidentIn_Message);
                Test_Port.ReceiveMessage(0, __msgEnv__, __ctx1__.__ResidentIn_Message, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__);
                if (Test_Port != null)
                {
                    Test_Port.Close(__ctx1__, __seg__);
                    Test_Port = 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__.__ResidentIn_Message);
                    __edata.PortName = @"Test_Port";
                    Tracker.FireEvent(__eventLocations[2], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 5;

            case 5:
                if (!PreProgressInc(__seg__, __ctx__, 6))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[3], __eventData[2], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 6;

            case 6:
                NBS.Biztalk.Logging.Log.LogInSql("1", "Low", System.Environment.MachineName, "Biztalk", "", "", "", "");
                if (!PostProgressInc(__seg__, __ctx__, 7))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 7;

            case 7:
                if (!PreProgressInc(__seg__, __ctx__, 8))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[4], __eventData[3], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 8;

            case 8:
                if (!PreProgressInc(__seg__, __ctx__, 9))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[5], __eventData[4], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 9;

            case 9:
                if (!__ctx1__.PrepareToPendingCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                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);
                }
                Send_Resident_Port.SendMessage(0, __ctx1__.__ResidentIn_Message, null, null, __ctx1__, __seg__, Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists);
                if (Send_Resident_Port != null)
                {
                    Send_Resident_Port.Close(__ctx1__, __seg__);
                    Send_Resident_Port = null;
                }
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingResp) != 0)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.OutgoingResp);
                }
                goto case 11;

            case 11:
                if (!PreProgressInc(__seg__, __ctx__, 12))
                {
                    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__.__ResidentIn_Message);
                    __edata.PortName = @"Send_Resident_Port";
                    Tracker.FireEvent(__eventLocations[6], __edata, _stateMgrs[1].TrackDataStream);
                }
                if (__ctx1__ != null && __ctx1__.__ResidentIn_Message != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__ResidentIn_Message);
                    __ctx1__.__ResidentIn_Message = null;
                }
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 12;

            case 12:
                if (!PreProgressInc(__seg__, __ctx__, 13))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                Tracker.FireEvent(__eventLocations[7], __eventData[5], _stateMgrs[1].TrackDataStream);
                if (IsDebugged)
                {
                    return(Microsoft.XLANGs.Core.StopConditions.InBreakpoint);
                }
                goto case 13;

            case 13:
                if (!__ctx1__.CleanupAndPrepareToCommit(__seg__))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Blocked);
                }
                if (!PostProgressInc(__seg__, __ctx__, 14))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                goto case 14;

            case 14:
                if (!PreProgressInc(__seg__, __ctx__, 15))
                {
                    return(Microsoft.XLANGs.Core.StopConditions.Paused);
                }
                __ctx1__.OnCommit();
                goto case 15;

            case 15:
                __seg__.SegmentDone();
                _segments[0].PredecessorDone(this);
                break;
            }
            return(Microsoft.XLANGs.Core.StopConditions.Completed);
        }