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
| Entity | Core status | Notes |
|---|---|---|
| SPB | waiting_confirmation, revision, approved, reject | Focus on approval of material requests |
| PO (PreOrder) | waiting_confirmation, approved, complaint, received_by_logistic, received, reject, cancel | There is a complain → approved |
| Payment | waiting_confirmation, approved, verified | Payment finalization path |
| SPK | WAITING_APPROVAL, REVISION, APPROVED, FINISHED, REJECTED | Integer enums in SPK module |
| SPK Payment | WAITING_APPROVAL, REVISION, APPROVED, REJECTED | Approval 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.