Critical flow
The decision commit resolves concurrency. Which conditions ensure the result?
Approval and rejection both target version 3.
Starting point Only a committed approval opens a payment instruction.
Assumptions for the example case
A fictional municipal training example with a fixed grant of 300 euros. Caseworkers make the decision; a rules checker provides reasoned guidance. The design specifies no real eligibility requirements. All quantities, thresholds and operational targets are illustrative assumptions.
Commit the decision before payment
Commit the decision before payment
B-43 and Z-43 are jointly committed; payment response can be matched later.
Result: One decision, one payment instruction and an evidenced outcome.
The payment worker follows the committed decision and reconciles the same instruction.
Commit, response loss and resumption
- A-43 ready version 3
- Approve/reject in both orders → exactly one decision version; a payment instruction exists only if approval wins.
- decisionKey committed
- Retry identically, then change outcome → original decision; changed retry causes a conflict.
- Z-43 open
- 59,999/60,000/60,001 ms → clearing signal from 60,000; still unknown.
The decision commit resolves concurrent actions.
Exactly one decision increments the version.
Approval and rejection both target version 3.
Approval wins: approved decision and one payment instruction; rejection conflicts. Rejection wins: rejected decision and no payment instruction; approval conflicts.
- Alternative considered
- Last-write-wins would subsequently change the payout reason.
- Trade-off
- The losing action requires a fresh review.
- Reassess
- Further decision-making types need new transition rules.
Try it yourself
Predict both winning orders.
A hint for your attempt
Approval and rejection both target version 3.
Compare with a possible solution
- Approval first
- Approved decision and one payment instruction; rejection conflicts.
- Rejection first
- Rejected decision, no payment instruction; approval conflicts.
Apply to your project
How does this principle apply in your own project: The decision commit resolves concurrency.