I have created an simple activity, registered it in IOC and have got exeption:
GreenPipes.PayloadNotFoundException: The payload was not found: Automatonymous.IStateMachineActivityFactory
at GreenPipes.PipeExtensions.GetPayload[TPayload](PipeContext context)
at Automatonymous.Activities.ContainerFactoryActivity`3.Automatonymous.Activity<TInstance,TData>.Execute(BehaviorContext`2 context, Behavior`2 next)
at Automatonymous.Activities.DataConverterActivity`2.Automatonymous.Activity<TInstance>.Execute[T](BehaviorContext`2 context, Behavior`2 next)
at Automatonymous.Behaviors.LastBehavior`1.Automatonymous.Behavior<TInstance>.Execute[T](BehaviorContext`2 context)
at Automatonymous.States.StateMachineState`1.Automatonymous.State<TInstance>.Raise[T](EventContext`2 context)
at Automatonymous.States.StateMachineState`1.Automatonymous.State<TInstance>.Raise[T](EventContext`2 context)
at Automatonymous.AutomatonymousStateMachine`1.Automatonymous.StateMachine<TInstance>.RaiseEvent[T](EventContext`2 context)
at Automatonymous.Pipeline.StateMachineSagaMessageFilter`2.Send(SagaConsumeContext`2 context, IPipe`1 next)
at MassTransit.EntityFrameworkCoreIntegration.Saga.EntityFrameworkSagaRepository`1.MassTransit.Saga.ISagaRepository<TSaga>.Send[T](ConsumeContext`1 context, ISagaPolicy`2 policy, IPipe`1 next)
What's wrong?
On Friday, October 4, 2019 at 6:02:38 PM UTC+3, Chris Patterson wrote:
The state machine is just behavior, it shouldn't have any constructor dependencies. If you have them, you should move them to a state machine activity which is created for each message when events are consumed.
Hi. My statemachine is registered (.net Core imbedded IOC) as follows:
.AddTransient<SmLotConfiscatedProperty>()
I expect, that every time new event is coming, new statemachine instance is created and process the event.
But now statemachine's constructor is called only once, and all events are processed by single instance! Please advice!
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.