Skip to main content

State Machines

Layman's summary

A state machine is a state map. So we can know: where the documents are now, and what the next legal steps are.

Visual Summary

EntityCore statusNotes
SPBwaiting_confirmation, revision, approved, rejectFocus on approval of material requests
PO (PreOrder)waiting_confirmation, approved, complaint, received_by_logistic, received, reject, cancelThere is a complain → approved
Paymentwaiting_confirmation, approved, verifiedPayment finalization path
SPKWAITING_APPROVAL, REVISION, APPROVED, FINISHED, REJECTEDInteger enums in SPK module
SPK PaymentWAITING_APPROVAL, REVISION, APPROVED, REJECTEDApproval payment per SPK

1) SPB

2) PO (PreOrder)

3) Payment (PO)

4) SPK

5) SPK Payment

Sequence Status Update (PO Example)

Requires verification

Some transitions can be further restricted by controller/action rules (e.g. documents must be complete first). This diagram represents the model state + dominant patterns in the flow.