State Diagramstateapprovalworkflow
Approval State Machine
Model an approval workflow with Mermaid states for draft, review, rejection, approval, publishing, and archiving.
Use Cases
Define lifecycle rules for content or configuration changes
Clarify who can move work between approval states
Spot missing transitions before implementation
Document publishing, review, compliance, or release workflows with explicit end states
How This Workflow Works
| Step | Purpose |
|---|---|
| Draft | Captures work that is still being prepared before it is ready for formal review. |
| In review | Represents the approval checkpoint where reviewers can accept or request changes. |
| Rejected | Routes work back for revision instead of letting rejected items disappear from the process. |
| Approved | Marks work that has passed review and is ready for publishing or execution. |
| Archived | Defines the closed state after published work is retired, superseded, or no longer active. |
How To Customize
Rename states to match your internal workflow
Add guarded transitions for role or permission checks
Include rollback paths for rejected or archived work
Add transition labels for submit, approve, reject, publish, pause, or reopen actions
Add terminal states for canceled, expired, or superseded work if your process needs them
Edit This Template Visually
Open this template in the editor to work from the rendered diagram and the Mermaid source together. Click a node in supported flowchart and sequence diagrams to locate the matching code, select source lines to find the related shape, or ask AI to rename, expand, restyle, or rewrite the selected part of the workflow.
Mermaid Source
stateDiagram-v2
[*] --> Draft
Draft --> InReview: submit
InReview --> Approved: approve
InReview --> Rejected: request changes
Rejected --> Draft: revise
Approved --> Published: publish
Published --> Archived: archive
Archived --> [*]