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);
        }
Exemple #2
0
        public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Envelope __msgEnv__ = null;
            Microsoft.XLANGs.Core.Segment  __seg__    = _segments[1];
            Microsoft.XLANGs.Core.Context  __ctx__    = (Microsoft.XLANGs.Core.Context)_stateMgrs[1];
            __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);
        }
Exemple #3
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);
        }
Exemple #4
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);
        }
Exemple #5
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.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);
        }
Exemple #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];
            __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;
        }
Exemple #8
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 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);
        }
Exemple #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);
        }
Exemple #11
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);
        }
Exemple #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];
            __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);
        }
Exemple #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];
            __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);
        }
Exemple #14
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 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);
        }
Exemple #16
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);
        }
Exemple #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];
            __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);
        }
Exemple #18
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);
        }