Beispiel #1
0
        private async Task VisitIntermediateCatchMessageEvent(
            TIntermediateCatchEvent intermediateCatchEvent,
            TMessageEventDefinition messageEventDefinition)
        {
            var messageRef = messageEventDefinition.MessageRef.ToString();

            _logger.LogWarning("Waiting for message {message}", messageRef);

            var result = await EventReceiver.WaitForEventAsync <JObject>(messageRef, _terminateCancellationTokenSource.Token);

            _logger.LogWarning("Received message {message}", messageRef);

            await VisitFlowNodes(GetParallelOutgoingNodes(intermediateCatchEvent));
        }
Beispiel #2
0
            public override async Task <object> Execute(object input)
            {
                var eventA = await EventReceiver.WaitForEventAsync <EventA>("EventA");

                var eventB = await EventReceiver.WaitForEventAsync <EventB>("EventB");

                var eventC = await EventReceiver.WaitForEventAsync <object>("EventC", TimeSpan.FromSeconds(1), null);

                var result = new
                {
                    EventA = eventA,
                    EventB = eventB,
                    EventC = eventC
                };

                return(result);
            }
Beispiel #3
0
            public override async Task <object> Execute(object input)
            {
                List <EventA> eventsA = new List <EventA>();
                List <EventB> eventsB = new List <EventB>();

                using (EventReceiver.AddListener <EventA>("EventA", eventsA.Add))
                    using (EventReceiver.AddListener <EventB>("EventB", eventsB.Add))
                    {
                        await EventReceiver.WaitForEventAsync <object>("Stop");
                    }

                var result = new
                {
                    EventsA = eventsA,
                    EventsB = eventsB
                };

                return(result);
            }