Sequence diagram
A bookshop's checkout: the shopper, the storefront, the api, a stock hold it creates and later deletes, the stock, the card gateway and the warehouse, their messages in time order with every frame the type draws. The page below opens on it, A bookshop's checkout, live: pan, zoom, select and go into the cards that stack.
What it shows
In the order you find them in the picture:
- Lifelines left to right, each head
name : Typeover a dashed stem (api : ShopApi) - An actor lifeline, <<actor>> over its head (shopper : Customer)
- A synchronous call, solid with a filled arrowhead (checkout(), place(order))
- A
breakframe with its guard (basket is empty) holding an asynchronous message - An asynchronous message, solid with an open arrowhead (showError, orderPlaced, release)
- A self-call drawn as a loop back to its own lifeline (validate(order))
- Activation bars derived from the messages, a nested bar set to the right of its parent (api during validate)
- A create message, dashed and open, the created lifeline's head lowered to it (new(order) to hold : StockHold)
- A
loopframe (for each order line) with a call and its reply inside - A reply, dashed with an open arrowhead, back to the caller (reserved, paid, declined, result)
- An
altframe with two operands, their guards and a dashed divider (payment accepted, else) - A
parframe nested in an operand, its two operands running at once (tell the shopper, tell the warehouse) - An
optframe nested in thepar(shopper is still on the page), three frames deep - An interaction use, a
refbox over the lifelines it covers (Send receipt email, over storefront and api) - A message with a stereotype, <<amqp>> before its label (pickList(order) to the warehouse)
- A delete message, the receiver's stem ending in a cross (close() to hold)