Skip to content

Entity Lifecycle

Define lifecycle states and transition constraints for core entities so implementation remains consistent across API, sync, and standards exports.

  • State transitions are explicit and auditable
  • Temporal validity is preferred over hard deletion
  • Reversible transitions must preserve history
  • Terminal states do not destroy person learning history
  • draft
  • scheduled
  • active
  • paused
  • completed
  • archived
  • canceled
  • draft -> scheduled when staffing and minimum metadata are valid
  • scheduled -> active at start time or explicit activation
  • active -> paused for temporary suspension
  • paused -> active when resumed
  • active -> completed when learning window ends
  • scheduled -> canceled before activation
  • completed -> archived after retention threshold
  • invited
  • active
  • suspended
  • withdrawn
  • completed
  • expired
  • invited -> active when accepted or auto-provisioned
  • active -> suspended for temporary policy hold
  • suspended -> active after reinstatement
  • active -> withdrawn for deliberate exit
  • active -> completed at successful closure
  • active -> expired at end of effective window without completion signal
  • effective_from is required
  • effective_until may be null for open-ended membership
  • Backdated status changes must preserve prior audit entries
  • draft
  • published
  • active
  • retired
  • draft -> published after validation
  • published -> active at release
  • active -> retired when replaced or deprecated

Once attempts exist, immutable fields should be frozen or versioned.

  • started
  • submitted
  • evaluated
  • finalized
  • invalidated
  • started -> submitted by learner or timeout policy
  • submitted -> evaluated by auto/manual scoring
  • evaluated -> finalized when grade publication is committed
  • finalized -> invalidated only via explicit remediation workflow
  • proposed
  • granted
  • revoked
  • superseded
  • proposed -> granted when criteria are satisfied
  • granted -> revoked with policy-based reason and audit trail
  • granted -> superseded when replaced by higher or corrected award

Core learning records should not be hard deleted in normal workflows.

Preferred approach:

  • Use state transitions (archived, retired, revoked, withdrawn)
  • Preserve immutable audit events
  • Use retention windows for non-critical artifacts

Lifecycle transitions can emit integration events:

  • Offering and membership transitions inform roster systems
  • Attempt and score transitions inform xAPI/LRS and grade exchange
  • Qualification transitions inform CLR/Open Badge projections

See mapping details in integration docs.

  • State enums and validation: packages/domain
  • State columns and constraints: packages/db
  • Conflict-safe local transition application: packages/offline-data
  • Transition authorization and side effects: apps/api