flowchart TB
subgraph fwd["Forward path"]
direction LR
f1["1. Reserve stock"] --> f2["2. Authorise payment"] --> f3["3. Create consignment"] --> f4["4. Capture payment"] --> f5["5. Despatch"]
end
subgraph comp["Compensation"]
direction RL
k1["Release stock"] --- k2["Void authorisation"] --- k3["Cancel consignment"] --- k4["Refund<br/><i>visible to customer</i>"]
end
f1 -.->|"undo"| k1
f2 -.->|"undo"| k2
f3 -.->|"undo"| k3
f4 -.->|"undo"| k4
f5 -.->|"no undo — goods have left"| x(["point of no return"])
Saga Compensation Flow
A multi-service transaction as forward steps each paired with an undo, showing where the sequence becomes irreversible.