Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Elements of state diagrams

ElementSyntax
Statestate Name { ... }, entry /, do /, exit /
Regionregion "name" { ... }
Pseudostates[*], choice, junction, fork, join, terminate, [H], [H*]
Entry and exit pointsentrypoint e, exitpoint x
Transitiona --> b : trigger [guard] / effect
Notenote a: text
diagram state "All the state elements"
[*] --> Idle
Idle --> Busy : start [ready] / log()
state Busy {
  entry / open()
  [*] --> Work
  Work --> [*]
}
Busy --> [*]
All the state elements Busy entry / open() Work Idle start [ready] / log()

See State diagrams for how to write one.