Skip to main content

Workflow Task Storage

Summary

WorkflowTask is a tenant-tagged child of one instance and stores assignment and decision state.

Mapping

The application assigns its GUID. Step name, approver type and status are required; enum values convert to text. User/role assignment, comment, decision actor/time and delegated destination are optional with configured length limits.

Relationships and indexes

The required instance foreign key cascades from instance deletion. Indexes support tenant/status/user and tenant/status/role worklists; the migration also indexes the instance foreign key. Tenant filtering applies.

Lifecycle

Stage opening inserts Pending tasks. Approval/rejection updates decision fields. Delegation changes assignment fields while retaining Pending status.

Limitations

No concurrency token, due time, priority, claim owner, delegation history or database check constraint protects state combinations.

Requires Confirmation

Task retention, assignment normalization and simultaneous decision handling require confirmation.

Source References

  • microservices/src/workflow-service/Domain/Workflow/WorkflowInstance.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