Skip to main content

Workflow Database Limitations

Summary

The schema supports core Workflow behavior with material persistence, concurrency, tenancy, transaction, testing, governance, retention and evolution gaps.

Persistence

  • Runtime instance definition/version references and action task references lack foreign keys.
  • Processed-event storage has no active consumer writer.
  • Audit/timeline use string entity references.

Concurrency

  • No row versions, concurrency tokens, locks or retry handling.
  • State guards do not guarantee single-winner concurrent decisions.

Tenant isolation

  • Nine entity filters plus administrative bypass are implemented.
  • Outbox and processed events are unfiltered.
  • Missing runtime tenant can become a zero-filtered read context.

Transactions

  • One normal command save boundary is used, but no explicit transaction/retry policy exists.
  • Relay status and seed definitions use later/separate saves.

Testing

  • Integrated smoke coverage exists.
  • Mapping, migration, repository, concurrency and tenant-isolation tests were not found.

Governance and retention

  • No cleanup, archival, partitioning, retention, backup/recovery or production migration procedure in Workflow source.

Schema evolution

  • One initial migration/snapshot exists.
  • No compatibility storage, drift check or rollback verification was found.

Requires Confirmation

Concurrency remediation, filter gaps, referential integrity, retention, migration ownership, recovery and database test strategy require confirmation.

Source References

  • microservices/src/workflow-service/Infrastructure/WorkflowDbContext.cs
  • microservices/src/workflow-service/Infrastructure/Persistence.cs
  • microservices/src/workflow-service/Program.cs
  • microservices/scripts/smoke-workflow.ps1

See Also

Keywords

Workflow database, EF Core, Workflow schema.

Revision Information

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