Skip to main content

State diagram

Overview​

State diagrams are used in computer science to describe how a system behaves. These diagrams show that a system has a limited number of states, which can either be literally true or a helpful simplification.

Code​

---
title: Simple sample
---
stateDiagram-v2
[*] --> Still
Still --> [*]

Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]

Example​

Atlassian Use Cases​

In Jira: Document Jira workflow states and transitions on a project or issue type, making it easy for teams to understand how issues move through the lifecycle.

In Confluence: Use state diagrams in technical design documents, feature specifications, or onboarding pages to describe the lifecycle of an object (e.g., order states, user account states).

Example: Jira issue lifecycle​

stateDiagram-v2
[*] --> To Do
To Do --> In Progress : Start work
In Progress --> In Review : Submit for review
In Review --> In Progress : Request changes
In Review --> Done : Approve
Done --> [*]

Full Syntax Reference​

For the complete Mermaid state diagram syntax, see the official Mermaid documentation.