Process Flow - Saga pattern for distributed transactions
Start Transaction
Execute Step 1
Publish Event 1
Execute Step 2
Publish Event 2
Check Success?
No→Execute Compensating Step 1
Publish Compensate 1
Execute Step 3
Publish Event 3
End Transaction
The saga pattern breaks a big transaction into steps. Each step publishes an event. If a step fails, compensating steps undo previous work.