Interfaces
One key identifies one decision. Which conditions ensure the result?
Loss of response can lead to repetition.
Starting point The number of approvals determines the payment volume.
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.
Decision contract
Decision contract
Approve or reject version 3; replay returns the original result; a changed outcome causes a conflict.
Proposed domain contracts
- POST
/antraege/A-43/entscheidungenCommit the decision notice.
- Input
- decisionKey, expectedVersion, evidenceHash=N-43, ruleVersion, outcome=approved|denied, reason, reviewer
- Result
- The decision version and, only on approval, exactly Z-43.
- Retry behaviour
- Identical input returns the same result; a changed reason under the same key causes a conflict.
- POST
/bescheide/B-43/widerspruecheReceive an appeal.
- Input
- appealKey, receivedAt, statementHash, challengedVersion
- Result
- Open review case W-43.
- Retry behaviour
- Record identical submissions once; supplementary evidence has its own version.
One key identifies one decision.
The key binds outcome and the rationale.
Loss of response can lead to repetition.
Return the existing decision. Changed input causes a conflict without a new decision or payment.
- Alternative considered
- Reusing an approval key for a changed rejection conceals a new decision.
- Trade-off
- An actual amendment requires a new version.
- Reassess
- Contract modification needs versioning.
Try it yourself
Compare identical and changed repetition.
A hint for your attempt
Loss of response can lead to repetition.
Compare with a possible solution
- Identical
- Return the existing decision notice.
- Changed
- Conflict without a new decision or payment.
Apply to your project
How does this principle apply in your own project: One key identifies one decision.