I am doing an action on the transition from init to processing in DeliveryStateMachine. If this call fails I don’t want the state on the delivery to be processing but error instead. But even if I set the delivery state to error in the action it still comes out as processing when action complete. I know this is out of the box but how can I work around this best?
The best thing for me would be to do this action when delivery is created/getting initial state, but can’t seem to make this happen, hence I make this action on state transition init => processing since I can trigger this with related state between OrderState.Confirmed and DeliveryState.Processing. But if anyone have a tip for how to do this action when delivery enters init state I would be happy. I have tried to make an action on the DeliveryStateMachine.AddInitialState, but it won’t hit this code.
Litium version: 7.6.2
Thx in advance.