Skip to main content

Workflow Definition Model

Summary

WorkflowDefinition is the authoring aggregate root. It owns versions; versions own steps and conditions.

Definition

The definition stores tenant, key, descriptive fields, category, status, latest and published version numbers, creator and timestamps. Creation produces Draft version 1. Key uniqueness is also enforced per tenant in persistence.

Version

WorkflowVersion is mutable until published. Replacing steps clears and rebuilds steps and conditions. Publishing freezes further replacement. Editing a definition after its latest version is published creates the next draft.

Step and condition

A step stores order, name, approver type/value, step type and mode. Conditions are version-level records associated to a stage by step order and store field, operator and value.

Canonical versus compatibility

These domain entities are canonical. No separate compatibility definition object or legacy Workflow model was found.

Limitations

Archive status exists without an archive operation. Step order, condition operator/value and approver-value completeness receive limited structural validation.

Requires Confirmation

Archive lifecycle, version rollback, duplicate step-order intent and future compatibility contracts require confirmation.

Source References

  • microservices/src/workflow-service/Domain/Workflow/WorkflowDefinition.cs
  • microservices/src/workflow-service/Domain/Common/Enums.cs
  • microservices/src/workflow-service/Infrastructure/WorkflowDbContext.cs

See Also

Keywords

Workflow architecture, approval engine, Workflow Service, technical foundation.

Revision Information

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