Expand description
Commits, committed events, receipts and external outcome states (spec §16-17).
Events are the claim ledger: an operational receipt may only be emitted from committed events or an authoritative external receipt (I16).
§Personal data in a payload, and how it leaves
The ledger is append-only and a case’s identity outlives its content, so nothing in this module removes an event or a case. That would leave personal data in a payload with no exit, which is not a position a library may hand an adopter who is legally obliged to erase it on request, so there is a third way out: the store redacts a payload in place and the event keeps its identity, its type, its position and its timestamps. Nothing appears, disappears or moves.
What a receipt renderer is then handed is a ReceiptEvent, which is a
committed event or a RedactedEvent, so a domain is told explicitly
that a payload is gone and writes the copy that says so. The write half of
the operation lives in the store contract
(turnframe_store::events::EventJournalWriter::redact_payload).
An event payload that carries a reference — a traveler id rather than a name, an attachment id rather than the text read out of it — is easier to erase, because erasing the record the reference points at empties the payload without touching the ledger at all. Design payloads that way where you can. The honest caveat is that it does not generalise: a receipt says what changed, and “the traveler’s name is now Marta Bianchi” cannot be rendered from an id. Wherever the receipt needs the value, the value is in the payload and this path is the exit for it.
Structs§
- Artifact
Ref - A reference to an artifact produced by a command (PDF, XML, protocol id…).
- Commit
- Result of executing a command batch (spec §17.1).
- Committed
Event - One committed domain event (spec §17.1).
- Event
Redaction - The record of an erasure: that a payload was removed, when, and on whose authority.
- Event
Ref - Reference to a committed event without its payload.
- Operational
Receipt - A deterministic, server-rendered statement of what happened (spec §17.3).
- Outbox
Entry - One external side effect awaiting dispatch (spec §16.4).
- Redacted
Event - A committed event whose payload was erased (see the module documentation).
- Unknown
Outcome - An external effect was attempted and its result is unknown (I15).
Enums§
- External
Status - Fine-grained state of a request another system decides (spec §17.4).
- Outbox
Status - Status of an outbox row (spec §16.4).
- Receipt
Event - One event as offered to
WorkflowDefinition::receipts: its payload is either still in the ledger or has been erased. - Receipt
Severity - Severity of a receipt.