Initially(When(WorkRequested) .TransitionTo(Validating) .Then(context => this.RaiseEvent(context.Instance,RequestValidated,context.Data))); During(Validating, When(RequestValidated, filter => filter.Data.IsValid) .TransitionTo(SomeWorkFlow.Pending) .Request(SomeWorkFlow,context=>context.Data)));
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/7824ca02-67ed-4c5a-b3ff-ecd1cdd13186%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Yeah I see what's happening and it is going to require some under the hood glue to make it do what you expect. Or you can pass the ConsumeContext as an argument on the tail end of the RaiseEvent call to store it in the payload of the event. That's what the under the hood tweaks are going to do anyway.__
Chris Patterson
--Hi,In MT3 Saga if I call RaiseEvent inside Then or ThenAsync activity and there is a Request called during handling of this event,Request is not executed and fails with following exception:Exception thrown: 'System.ArgumentException' in MassTransit.AutomatonymousIntegration.dllAdditional information: The ConsumeContext was not availableE.g.:
Initially(When(WorkRequested).TransitionTo(Validating).Then(context => this.RaiseEvent(context.Instance,RequestValidated,context.Data)));During(Validating,When(RequestValidated, filter => filter.Data.IsValid).TransitionTo(SomeWorkFlow.Pending).Request(SomeWorkFlow,context=>context.Data)));
Somehow it looses the context.Hope it makes sense.
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
Actually I don't think I have access to ConsumeContext inside Then.
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/99929d59-05ff-41d0-bb4f-d638491dd52b%40googlegroups.com.
You do, you just have to GetPayload<ConsumeContext> (or TryGetPayload, either way) - as it is part of the eventContext payload collection. That's what it is doing under the hood.These are going to be in the next release, but you can duplicate the logic for now.
On Wed, Oct 21, 2015 at 6:59 AM, Alex Michel <ami...@gmail.com> wrote:
Actually I don't think I have access to ConsumeContext inside Then.
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.