Workflow Entity Relationships
Summary
Five required one-to-many relationship paths define aggregate ownership. Other identifiers are scalar references without configured foreign keys.
Relationship diagram
Cascade behavior
Deleting a definition cascades through versions to steps and conditions. Deleting an instance cascades to tasks and actions.
Scalar references
Instance definition/version identifiers are not configured as foreign keys. Action task identifier is not a foreign key. Audit/timeline entity references are strings without relationships. Outbox and processed-event records are independent.
Limitations
Database referential integrity does not connect runtime instances back to definition/version rows or actions to tasks.
Requires Confirmation
Whether runtime history intentionally survives definition deletion and whether additional foreign keys are safe require confirmation.
Source References
microservices/src/workflow-service/Infrastructure/WorkflowDbContext.csmicroservices/src/workflow-service/Infrastructure/Migrations/20260706165438_InitialWorkflowSchema.cs
Related Articles
See Also
Keywords
Workflow database, EF Core, Workflow schema.
Revision Information
- Status: Draft
- Last reviewed: 2026-07-20
- Next review: 2026-10-20