Hi!
Is it possible to know if a request to change the state of an order was triggered from backoffice by a user? I’ve set isUserInitiable to true(Code below). But I want to catch that event so i can override the transition conditions in that case.
private void TransitionFromReadyForERP(OrderStateMachine stateMachine, State<OrderCarrier> readyForErp, State<OrderCarrier> completed)
{
stateMachine.AddStateTransition(readyForErp, completed,
(orderCarrier, readyForErp, completed, token) =>
{
if (orderCarrier.Type == OrderType.SalesReturnOrder)
{
return false;
}
return IsSentToErp(orderCarrier);
}, true);
}
Litium version: 7.3.2