Skip to content
State machine (FSM) templates

State machine — document publishing

Editorial doc state machine.

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

What this template contains

Source
12 lines

Make it your own.

title "Document publishing"
state Draft
state Review
state Approved
state Published final
state Archived final
initial Draft
transition Draft -> Review on "submit"
transition Review -> Draft on "request_changes"
transition Review -> Approved on "approve"
transition Approved -> Published on "publish"
transition Published -> Archived on "archive"