Diagram Wiki/State machine

Draft field guide

SoftwareDRAFT ENTRY

State machine

A behavioral model of the states an entity can occupy and the events or guards that move it between them.

Use this diagram to generate
LIVE SPECIMENState machine · minimal light
USE WHEN

Lifecycle rules and invalid transitions matter.

AVOID WHEN

You are documenting a one-off workflow without durable states.

VISUAL GRAMMAR
01states02transitions03events04guards05terminal state
SEMANTIC RULES
  1. Use stable nouns for states.
  2. Label transitions with events.
  3. Make terminal and error states explicit.
  4. Do not confuse actions with states.
QUESTIONS IT ANSWERS
  • What can this become?
  • Which event changes its state?
DRAFT MACHINE CONTRACT
id: state
status: draft
family: software
reading_task: See an object's valid states and transitions.
grammar:
  - states
  - transitions
  - events
  - guards
  - terminal_state
checks:
  - use_stable_nouns_for_states
  - label_transitions_with_events
  - make_terminal_and_error_states_explicit
  - do_not_confuse_actions_with_states
KEEP EXPLORING

Choose by the question you need to answer.

Browse all 28 diagram types