Skip to main content

Workflow Definition Storage

Summary

WorkflowDefinition is a tenant-owned aggregate root stored in the definition table.

Mapping

The application assigns its GUID. Key, name, category, status and creator are required with configured maximum lengths; description is optional. Status converts to text. Domain-event state is ignored.

Ownership and relationships

One definition owns many versions through a required foreign key with cascade deletion.

Indexes and constraints

The primary key is the GUID identifier. Tenant plus key is unique. The entity has a tenant query filter with administrative bypass.

Lifecycle

Creation stores Draft version 1. Updates change descriptive fields and draft content through owned versions. Publication updates status/version metadata; no delete/archive persistence command exists.

Requires Confirmation

Deletion governance, archive retention, key normalization and concurrency control require confirmation.

Source References

  • microservices/src/workflow-service/Domain/Workflow/WorkflowDefinition.cs
  • microservices/src/workflow-service/Infrastructure/WorkflowDbContext.cs
  • microservices/src/workflow-service/Infrastructure/Migrations/20260706165438_InitialWorkflowSchema.cs

See Also

Keywords

Workflow database, EF Core, Workflow schema.

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-20
  • Next review: 2026-10-20