DemandLifecycleObserver

Named lifecycle hooks for SupplyChainModel.Demand state transitions. Implement only the hooks you care about; the others default to no-op.

Each hook fires exactly when the underlying state machine transitions the demand into the matching state. Note that the pre-active states (DemandStateId.InPreparation, DemandStateId.Negotiating, DemandStateId.Sent) are silent in the underlying state machine and therefore have no hooks here. received / rejected are gated by order membership (see Demand.transitionTo); hooks fire only when the demand is not part of an order — order-attached demands route through the order's own lifecycle observer.

Attach via observe.

Functions

Link copied to clipboard

Fired when the demand transitions to DemandStateId.BackLogged.

Link copied to clipboard

Fired when the demand transitions to DemandStateId.Cancelled.

Link copied to clipboard

Fired when the demand transitions to DemandStateId.Delivered — the carrier finished transport and the items are physically at the destination. Not terminal: the destination's delivery endpoint typically transitions on to DemandStateId.Stored (or back to DemandStateId.Shipped for multi-hop pass-through).

Link copied to clipboard

Fired when the demand transitions to DemandStateId.Filled.

Link copied to clipboard

Fired when the demand transitions to DemandStateId.InProcess.

Link copied to clipboard

Fired when the demand transitions to DemandStateId.Received.

Link copied to clipboard

Fired when the demand transitions to DemandStateId.Rejected.

Link copied to clipboard

Fired when the demand transitions to DemandStateId.Shipped.

Link copied to clipboard

Fired when the demand transitions to DemandStateId.Stored — the destination has finalised receipt and accounting listeners fire here. Terminal state for storing destinations.