Quick Answer
A state machine diagram (statechart) maps every valid state an object can occupy and the events and guard conditions that transition between them. This free browser maker loads an editable order-approval statechart with initial, final and choice pseudostates — export SVG, PNG, PDF or Visio (.vsdx) with no account.
What this template looks like in the editor

What’s inside this starter template
- Initial pseudostate (filled black dot) entering Draft and Final pseudostate (bullseye) terminating Published.
- Four rounded states: Draft, Submitted, Published and Rejected.
- A choice diamond after Submitted branching along guarded transitions [approved] → Published and [rejected] → Rejected.
- Event-labelled transitions submit() and revise() looping rejected items back to Draft.
Catching illegal state transitions before writing code
Order statuses, subscription billing states, payment intents and device boot flows cause subtle production bugs whenever two events race or a terminal state accidentally allows a retry. Drawing the state machine first forces every legal edge onto one page: for each state box, ask "what happens if cancel, timeout or retry arrives right now?" and either add the transition or document that it is ignored.
Pair every conditional branch out of a choice diamond with exhaustive, non-overlapping guards in square brackets ([approved] vs [rejected]) and make sure every non-final state has a way forward so entities cannot get stranded. Exporting the finished statechart as an SVG beside your enum definition keeps engineering and QA aligned on every allowed status change.
How It Works
Double-click the four starter states (Draft, Submitted, Published, Rejected) to model your own entity lifecycle.
Edit the transition arrows using standard event [guard] syntax such as submit() or [approved].
Drag extra State, Initial, Final or Choice shapes from the UML & software palette and join them with the Connect tool.
Run Tools → Check diagram to verify no transition hangs unconnected, then export SVG, PDF or Visio.
Key Facts
- Initial (filled circle), Final (bullseye), rounded State and Choice diamond shapes
- Starter Draft → Submitted → Published / Rejected lifecycle with guard brackets
- Glue multiple outgoing or self-loop transitions cleanly to any state
- Record entry/exit actions or invariants in each state’s Shape Data tab
- Export crisp SVG, PNG, PDF, draw.io or Visio (.vsdx)
Frequently Asked Questions
What does the diamond symbol mean in a UML state machine?
A diamond is a choice pseudostate: an incoming transition evaluates a dynamic condition there and branches onto mutually exclusive guarded paths such as [approved] and [rejected].
How should I label transitions in a statechart?
The standard UML format is event [guard] / action — for example pay(card) [balance >= total] / sendReceipt(). Omit any part you do not need, keeping brackets strictly around boolean guard conditions.
Can I draw a self-transition (an event that leaves an object in the same state)?
Yes. Connect a shape back to itself and use Tools → Add waypoint to connector (with the connector selected) to pull the loop outward so its label stays clear of the state box.
Related diagram types
- UML sequence diagramShow which external service sends the events that trigger each state transition.
- UML class diagramModel the surrounding classes and OrderStatus enum values.
- FlowchartDraw the step-by-step procedural logic inside a single complex transition.
Comparing features against paid tools or opening an existing .vsdx file? Read the full Visio & Lucidchart alternative guide.
How this works
This template runs on the same client-side maxGraph diagram engine as the main editor. Every shape, connector and custom Shape Data property stays in your browser tab, autosaves to your device’s IndexedDB, and exports straight to PNG, SVG, PDF, PowerPoint, Word, draw.io or Visio (.vsdx) without uploading your diagram.
What this editor can’t do
- Nested composite (hierarchical) states and orthogonal regions are drawn with manual container boxes rather than enforced statechart semantics.
- This editor draws statecharts visually; it does not simulate or export XState/SCXML code.