System Design Atlas

Social care case coordination across organisations

04 / 10Worked example

Interfaces

How does the handover contract distinguish a retry from a new intent?

The load profile leads to the concrete command “Hand over extract”. It binds the support plan revision, extract hash, recipient, purpose and permission reference. An idempotency key identifies the same intent after response loss; an aggregate version protects the current domain state.

Starting point Concurrent withdrawal determines the critical load test.

Assumptions for the example case

Own fictitious example design. A fictitious voluntary exchange of a specific section of the aid plan between two organisations. A release granted for 3600 seconds in the example is only valid for age < 3600 seconds. All figures and test goals are illustrative assumptions.

Commands, retries and current state

Command, Commit and Replay

CommandSupport plan H-29 · Permission F-29 · Handover U-29
Command → Koordinations-APICheck content and expected version
Coordination APIAccept the command or recognise a replay
Koordinations-API → ErgebnisjournalCommit the result before responding
Result journalFingerprint + stored record

Identical content returns the stored record; altered content produces a conflict.

Handing over an extract binds its support plan revision, extract hash, recipient, purpose and permission reference. The same key refers to the stored result; changed content causes a conflict.

Proposed API for this example

  1. POST/help-plan-shares

    Grant permission to share an extract for a defined purpose.

    Input
    Supported person, H-29, support plan revision, extract hash, recipient organisation, purpose, expiry time and key.
    Result
    F-29 with immutable scope and active access permission; disclosure has not started.
    Retry behaviour
    After authorisation, compare the key and canonical content with the stored record. Identical input returns the same metadata record; changed content causes a conflict. Replay does not permit renewed disclosure: each content retrieval checks current permission again.
  2. POST/help-plan-shares/{id}/access

    Authorise and start a new content retrieval.

    Input
    Authenticated partner organisation, F-29, H-29, expected permission version, extract hash and access intent.
    Result
    Atomically check current permission and store U-29 as empfang_unbekannt before releasing bytes. Withdrawal first rejects access without bytes; replay returns only the existing metadata record and starts no new transmission.
    Retry behaviour
    After authorisation, compare the key and canonical content with the stored record. Identical input returns the same metadata record; changed content causes a conflict. Replay does not permit renewed disclosure: each content retrieval checks current permission again.
  3. POST/help-plan-shares/{id}/revoke

    Block new retrievals and investigate possible existing copies.

    Input
    Supported person or case coordinator with documented authority, F-29, expected version, withdrawal and key.
    Result
    Permission remains blocked. Without started disclosure, enter widerrufen; with empfang_unbekannt or übergeben, enter klärfall with a durable investigation/deletion task and outstanding evidence.
    Retry behaviour
    After authorisation, compare the key and canonical content with the stored record. Identical input returns the same metadata record; changed content causes a conflict. Replay does not permit renewed disclosure: each content retrieval checks current permission again.
  4. POST/share-receipts

    Durably record evidence of partner receipt.

    Input
    Authenticated partner organisation, unique evidence identifier, U-29, H-29, extract hash and receipt declaration.
    Result
    Save the inbox entry before acknowledging. Matching evidence confirms receipt; after withdrawal, klärfall stays open and permission stays blocked. A different hash or contradictory claim of non-receipt remains open for review.
    Retry behaviour
    After authorisation, compare the key and canonical content with the stored record. Identical input returns the same metadata record; changed content causes a conflict. Replay does not permit renewed disclosure: each content retrieval checks current permission again.
  5. POST/share-clarifications/{id}/evidence

    Record the outcome of an investigation/deletion task.

    Input
    Authenticated partner organisation, existing investigation task, U-29, extract hash, required action, scope, outcome and unique evidence.
    Result
    Link the evidence to the task. Required deletion stays open without matching evidence. Explicitly agreed further retention records its scope, responsible procedure and required review; timeout never establishes success.
    Retry behaviour
    After authorisation, compare the key and canonical content with the stored record. Identical input returns the same metadata record; changed content causes a conflict. Replay does not permit renewed disclosure: each content retrieval checks current permission again.
  6. POST/share-clarifications/{id}/close

    Confirm completion of the domain investigation.

    Input
    Case coordination, confirmation from data protection officers, existing investigation task, expected version and complete closure evidence.
    Result
    Enter abgeschlossen only after the actual outcome and agreed handling are evidenced; missing partner evidence rejects closure. Permission stays blocked.
    Retry behaviour
    After authorisation, compare the key and canonical content with the stored record. Identical input returns the same metadata record; changed content causes a conflict. Replay does not permit renewed disclosure: each content retrieval checks current permission again.
  7. GET/help-plan-shares/{id}/status

    Read permission, receipt and investigation status separately.

    Input
    Case coordinator, supported person or assigned partner organisation with access to this object.
    Result
    Current permission status, U-29 receipt status, investigation task, missing evidence and responsible role; the extract content is not disclosed again.
    Retry behaviour
    Reading status changes no domain effect and discloses no support plan content; current access permissions are checked again.

Additional state changes

OperationInputResult and protection
Content retrieval beginsCurrent permission and version, recipient, extract hashRecord the start as empfang_unbekannt before releasing bytes.
Apply withdrawalCurrent release version and documented requestBlock new calls; possible reception always leads to clarification.
Record receipt laterAuthenticated partner, U-29 and extract hashComplete the document, revocation remains effective.
Complete investigation/deletion taskPartner evidence plus case coordination and data protection officersOnly proven agreed handling allows conclusion.

Content retrieval begins

Input
Current permission and version, recipient, extract hash
Result and protection
Record the start as empfang_unbekannt before releasing bytes.

Apply withdrawal

Input
Current release version and documented request
Result and protection
Block new calls; possible reception always leads to clarification.

Record receipt later

Input
Authenticated partner, U-29 and extract hash
Result and protection
Complete the document, revocation remains effective.

Complete investigation/deletion task

Input
Partner evidence plus case coordination and data protection officers
Result and protection
Only proven agreed handling allows conclusion.

Messages across the external boundary

Source contract
The GDPR describes, among other things, purpose limitation, data minimization and revocation. An actual legal basis as well as specialist law remain to be examined project-specifically.
System responsibility
At the disclosure commit, the API checks permission and version and stores U-29 as empfang_unbekannt before transmitting extract bytes. The partner may receive content while its acknowledgement is lost. Withdrawal blocks access and moves U-29 to klärfall. Handover processing queries the same receipt reference instead of sending data again. A later acknowledgement records existing copies; case coordination and data protection officers follow up the agreed handling until it is evidenced.

Handover binds the exact extract hash

Handover binds the exact extract hash

Handover binds the exact extract hash.

The handover command may arrive again after a response is lost.

The support plan revision, extract hash, recipient, purpose and permission reference must stay identical on replay. Your test defines the input and expected result.

Alternative considered
A key stored only in volatile memory loses its evidence on restart.
Trade-off
The handover command journal requires durable retention and protected access.
Reassess
The documented retry window and journal volume determine the future archiving strategy.

Try it yourself

Predict the result of an identical handover retry, the same key with a different partner organisation, and a new key with an old version.

A hint for your attempt

Retry identity and current state require separate checks.

Compare with a possible solution
Identical
Return the stored result for support plan H-29 without repeating the effect.
Changed
The same key with altered canonical content results in conflict.
New intent with a stale version
A new key with a stale version is rejected before any business change. The interface reloads the current state and asks the user to confirm the decision again.

Apply to your project

Which input fields make two change intentions different in your project?

Next: Reception and release remain separate evidence.