Skip to content
State machine (FSM) templates

Document Workflow (State Machine)

Draft, review, approve or reject a document.

Template previewState machine (FSM)
Document workflow4 states · 4 transitions · 4 eventssubmitapproverejectreviseDraftReviewApprovedRejectedAll 4 states are reachable and every transition names states that exist.OKAll 4 states are reachable from `Draft`.OKEvery run from `Draft` can reach the final state.OKAll 4 transitions name states that exist, so every arrow in the figure is drawn.

Make it your own.

title "Document workflow"
state Draft
state Review
state Approved final
state Rejected
initial Draft
transition Draft -> Review on "submit"
transition Review -> Approved on "approve"
transition Review -> Rejected on "reject"
transition Rejected -> Draft on "revise"