I’m trying to simulate saga on zeebe.
This is my process (happy path)
But when ledger entries failed (can be technical error like network hiccup, or functional like invalid ledger account), we must “rollback” (or in saga terms, compensate) transactions.
This means, we need to debit the supplier bank.
If failure occured on “finalize payment” node (e.g. account payable invoice cannot created), we have to compensate previous nodes (which is creating reverse ledger entries, and debit supplier bank).
How do we handle this compensation in zeebe bpmn? Do we have to create many if-else gateways (one for every process) : if success, continue next process, otherwise do rollback, etc?