Teaching Case — A Reply That Went to the Wrong Participant
The same interaction with one word changed: the card vault answers the order service instead of the saga that called it. Fourteen arrows, fourteen rows, the same labels — one arrowhead lands one column further along. The saga is left blocked forever on an answer that went elsewhere, and the order service receives an answer to a call it never made. No runtime could produce this interaction, and no tool that draws what it is handed can tell you so.
Make it your own.
sequence "Checkout — card authorisation"
actor Shopper
participant Web "Storefront"
participant Orders "Order service"
participant Ledger "Ledger" concurrent
database Cards "Card vault"
Shopper -> Web : place order
Web -> Orders : POST /orders
Orders create Saga "Payment saga"
Orders -> Saga : begin(orderId)
alt on auth.code : "00","51","91"
when "00"
Saga -> Cards : authorize(token, 4200)
Cards reply Orders : approved(authId)
par
branch "post"
Saga -> Ledger : debit(4200)
Ledger reply Saga : posted
branch "notify"
Saga async Web : receipt.ready
end
Saga reply Orders : captured(authId)
when "51","91"
Saga -> Cards : authorize(token, 4200)
Cards reply Saga : declined(code)
Saga reply Orders : failed(code)
end
Orders destroy Saga
Orders reply Web : 201 Created
Web reply Shopper : confirmation