Skip to content
State machine (FSM) templates

Teaching Case — The Comment That Split the Figure From the Panel

Nothing in this document is wrong, and it is here because of what it used to do. There were two hand-written parsers for this notation — one for the drawing, one for the analysis panel — and the drawing's transition rule was anchored with a trailing `$` where the panel's was not. A transition ending in a comment was dropped from the FIGURE and kept in the PANEL, so the picture showed a machine with one fewer arrow than the text beside it described, both looking internally consistent, and nothing anywhere saying they were different machines. There is one parser now, and both read it. Reports clean.

Template previewState machine (FSM)
Incident escalation4 states · 5 transitions · 4 eventsacktimeoutresolveresolvereassignOpenAcknowledgedEscalatedClosedAll 4 states are reachable and every transition names states that exist.OKAll 4 states are reachable from `Open`.OKEvery run from `Open` can reach the final state.OKAll 5 transitions name states that exist, so every arrow in the figure is drawn.

Make it your own.

title "Incident escalation"

state Open
state Acknowledged      # someone has picked it up
state Escalated
state Closed final

initial Open

transition Open         -> Acknowledged on "ack"        // within SLA
transition Open         -> Escalated    on "timeout"    # SLA breach
transition Acknowledged -> Closed       on "resolve"
transition Escalated    -> Closed       on "resolve"
transition Escalated    -> Acknowledged on "reassign"   # back to the queue