Skip to content

Edit-Draft-Publish Lifecycle

Reference Data in Arda is edited directly by users. Its values feed into other Reference Data entities and into transactional workflows. To protect data integrity while still supporting iterative editing, all Reference Data follows a consistent Edit-Draft-Publish lifecycle.

Reference Data entities have two cross-cutting behaviors:

Every Reference Data entity maintains a history along two time dimensions:

  • recordedAt — when the value was recorded in the system (transaction time).
  • effectiveAt — when the value is effective for use by other processes (valid time).

The value at any pair of these TimeCoordinates is immutable. Creations, updates, and deletions each produce a new bitemporal record — old records are never overwritten. Consumer processes can retrieve the active value at any past or future time coordinates.

When a user creates or modifies a Reference Data entity, they can save it as either Draft or Published:

  • Published — a new bitemporal record is inserted into the entity’s permanent history. Other processes can immediately use this value.
  • Draft — a temporary record is held by the system. The entity’s history is unchanged. The draft can be edited further, then published or discarded. Only one draft per entity is supported at any time.
Start --> Creating --> Published (via publish [validateOK])
--> Discarded (via discard)
--> Creating (via publish [validateError])
Published --> Editing (via edit)
Editing --> Published (via publish [validateOK])
Editing --> Editing (via save draft)
Editing --> Editing (via publish [validateError])
Editing --> Published (via discard -- reverts to last published)
Editing --> Deleted (via delete)
Published --> Deleted (via delete)
StateDescription
CreatingEphemeral UI state while the user is entering data for a new entity. No backend record exists yet.
EditingUser is actively changing a published entity. The system retains the current draft.
PublishedA record is saved and entered into the entity’s bitemporal history.
DeletedThe entity is marked deleted. Bitemporal history is preserved.
FromToTriggerNotes
StartCreatingcreateSystem presents the creation form.
CreatingPublishedpublish [validateOK]First record created in history.
CreatingCreatingpublish [validateError]Validation failed; user corrects and retries.
CreatingEnddiscardUser cancels; no backend record kept.
PublishedEditingeditDraft initialized from the current published record.
EditingEditingsave draftUpdated draft saved; no validation performed.
EditingEditingpublish [validateError]Validation failed; draft retained.
EditingPublishedpublish [validateOK]New bitemporal record created; draft discarded.
EditingPublisheddiscardDraft deleted; entity stays at last published values.
EditingDeleteddeleteEntity marked deleted; draft removed.
PublishedDeleteddeleteNew bitemporal deletion record created.
  • edit and delete actions may carry additional validations that prevent the transition.
  • On publishing, the module that manages the entity emits notifications to subscribed modules.
  • discard while in the Editing state may prompt the user for confirmation.