State diagram (PlantUML)
PlantUML state diagrams support composite states, which is what you need once a state has its own internal machine.
#What this example shows
A composite state containing its own sub-states.
Guards in square brackets on transitions.
Entry actions, written inside the state.
#A worked example
Open it, edit it, or copy the source below.
The source, which you can paste into a new diagram and edit:
#Making it your own
Guards go in square brackets after the event, and they are where the real rules live.
Composite states keep large machines readable; use them before splitting the diagram.
Entry and exit actions belong on the state, not on every incoming arrow.
#Related
Verbose, stable, and it draws almost everything.
