Order Lifecycle State Machine
The specification an order-platform team keeps beside its code: two landscape pages built from one data file, the statechart on the first and the tables it is implemented from on the second.
- Identity block. An original company mark in svg, the service and title, and a key-value table of specification id, version, status (a pill), owner, reviewers, classification, date and the code generated from it, all bound from
$data. - The statechart. The four phases of an order (checkout, payment, fulfilment, after-sale) as lanes; states of one size on a grid, terminal states with a double border; the initial state a filled dot and each final state a ringed dot, as statecharts draw them; a retry self-loop on Payment failed with its guard; cancellations and timers dashed; each transition numbered by a badge with its event beside the line, never on it; a legend, a caption, and a title and description for screen readers.
- Transitions. A three-line table whose rows repeat from the data (
sourcewith a$itemtemplate row): event names in a monospaced face, guard, target, side effect and idempotency key, each row keyed by the badge on the diagram. - States and invariants. The states with their meaning, timeout and who can act, and the machine's invariants in two columns with small-capital labels; a running footer with the specification id, classification and page X of Y.
What to look for. Follow badge 5 on the diagram: the retry loop under Payment failed, guarded by attempt < 3; row 5 of the Transitions table gives its event, side effect and idempotency key. Every event label stands beside its line.
Features used: PDF/A-4, PDF/UA-2, DOCX Transitional conformance, columns, tables, SVG, data binding, headers and footers
- Output
- Template
- Data