State machine diagram
One bookshop order's life, from placed to delivered, cancelled or erased: the payment result chosen at a choice, picking and payment run side by side in two regions, a hold resumed by history, delivery with its problems, and the refund. The page below opens on it, An order's life, live: pan, zoom, select and go into the cards that stack.
What it shows
In the order you find them in the picture:
- An initial pseudostate, a filled circle
- A state with entry, do and exit rows and an internal transition (Placed)
- A transition labelled with its trigger only (payment result)
- A choice, a diamond, its exits guarded: [card authorised], [paid by gift card] and [else] / email the shopper
- A fork, a bar, splitting into states in two regions (after [paid by gift card])
- A composite state with two orthogonal regions, each named, a dashed divider between them (Fulfilling: Parcel and Payment)
- A transition ending on a composite state's border ([card authorised] into Fulfilling)
- An initial pseudostate inside each region
- A transition leaving a composite state from its border (hold requested, cancel requested / refund the payment)
- A deep history H* in the Parcel region, re-entered from On hold (hold lifted)
- A note linked to the deep history by a dashed line
- A self-transition with a trigger, a guard and an effect: capture failed [attempts < 3] / count the attempt
- A join, a bar, merging the two regions, then a transition with an effect only (/ hand the parcel to the carrier)
- A composite state holding its substates with no regions (In delivery)
- A shallow history H, re-entered when a problem is resolved
- A state with its activities collapsed (Out for delivery,
presentcollapsed) - A final state, a ring round a filled circle (parcel signed for / email the receipt)
- A closed composite state with UML's decomposition mark, its substates not shown (Under enquiry)
- A junction, a small filled circle, merging two transitions (refused at the door, parcel lost)
- A state's compartment cut to two rows then "+2 more" (Cancelled,
presentrows) - A terminate pseudostate, an X (after 30 days / erase the shopper's details)