One crash, two settings
Example, not a real engine
- 1 Fetch invoice
- 2 Draft decision
- 3 Ask for approval
- 4 Pay supplier
- 5 Write report
- First run
- 1done
- 2done
- 3done
- 4crashed
- 5not reached
- After the crash
- 1done
- 2done
- 3done
- 4done
- 5done
Resumes at: 1. Fetch invoiceSteps run in total: 9 (the workflow has 5). Times the person was asked: 2. Payments made: 2.The supplier is paid twice.The person has to approve again.
The rule, in words
- 1. The crash hits while a step runs, after its work happened and before its checkpoint was saved.
- 2. With checkpoints, the run resumes at the crashed step. Without them, it starts again at the first step.
- 3. Every run of the approval step asks the person. Every run of the pay step makes a payment.
- 4. An idempotency key makes a second payment call return the first result, so the supplier is paid once.
