Microservices order saga
A distributed order-processing saga showing the parts of UML sequence notation that generic tools omit — a ref interaction-use frame, a par fragment for concurrent service calls, asynchronous event-bus messages, and an alt fragment with a compensating rollback on payment failure.
For the distributed-systems engineer
This is the case that separates a real UML engine from a flowchart with stick figures. A saga is concurrent, asynchronous, and has a compensating path — and Schematex has dedicated notation for each.
ref keeps the diagram composable. "Validate cart & price" is its own interaction; inlining it here would bury the saga in detail. The ref over Orders, Bus : … frame references it instead — notation most text-to-diagram tools simply don't have.
par shows true concurrency. The order service charges the card and reserves stock at the same time. The par fragment's two operands say these run concurrently, not in sequence — a distinction a top-to-bottom message list cannot express.
Async vs. reply arrows are not cosmetic. ->> (open head) marks fire-and-forget calls and event-bus publishes; --> (dashed) marks the replies that come back. Reading the arrowheads tells you which steps block and which don't.
The compensation lives in the alt. When payment fails, the second operand releases the previously reserved inventory and emits OrderCancelled — the saga's rollback, drawn right beside the happy path instead of in a separate diagram.