Teaching Case — Two Boxes With One Name
`Cancelled` and `Void` are different states with the same label, so the figure prints one name twice. A reader cannot tell which arrow goes where, and a transition between the pair is indistinguishable from a self-transition on either of them — a defect that lives entirely in the drawing and cannot be seen by reading the source, which is where every reviewer looks.
What this template contains
- Source
- 11 lines
Make it your own.
title "Booking lifecycle"
state Held
state Confirmed
state Cancelled label "Cancelled" final
state Void label "Cancelled" final
state Completed final
initial Held
transition Held -> Confirmed on "pay"
transition Held -> Cancelled on "expire"
transition Confirmed -> Void on "chargeback"
transition Confirmed -> Completed on "check_out"