Elements of state diagrams
One page per symbol of a state diagram: what it looks like, its syntax and the UML 2.5.1 clause it follows. Use these pages to look something up; to write a whole diagram, start with State diagrams.
| Element | Syntax |
|---|---|
| State | state Name { ... }, entry /, do /, exit / |
| Region | region "name" { ... } |
| Pseudostates | [*], choice, junction, fork, join, terminate, [H], [H*] |
| Entry and exit points | entrypoint e, exitpoint x |
| Transition | a --> b : trigger [guard] / effect |
| Note | note a: text |
diagram state "All the state elements"
[*] --> Idle
Idle --> Busy : start [ready] / log()
state Busy {
entry / open()
[*] --> Work
Work --> [*]
}
Busy --> [*]
See State diagrams for how to write one, and the grammar for every statement.