FulfillmentProcess
The default FulfillmentProcess. This process includes the following actions:
- Executes the configured
FulfillmentHandler.onFulfillmentTransition()before any state transition. - On cancellation of a Fulfillment, creates the necessary Cancellation & Allocation stock movement records.
- When a Fulfillment transitions from the
CreatedtoPendingstate, the necessary Sale stock movements are created.
A FulfillmentProcess is used to define the way the fulfillment process works as in: what states a Fulfillment can be
in, and how it may transition from one state to another. Using the onTransitionStart() hook, a
FulfillmentProcess can perform checks before allowing a state transition to occur, and the onTransitionEnd()
hook allows logic to be executed after a state change.
For detailed description of the interface members, see the StateMachineConfig docs.
- Extends:
InjectableStrategy
transitions
property
Transitions<State, State | FulfillmentState> & Partial<Transitions<FulfillmentState | State>>onTransitionStart
property
OnTransitionStartFn<State | FulfillmentState, FulfillmentTransitionData>onTransitionEnd
property
OnTransitionEndFn<State | FulfillmentState, FulfillmentTransitionData>onTransitionError
property
OnTransitionErrorFn<State | FulfillmentState>Was this chapter helpful?