Skip to main content

Workflow Entity Mappings

Audience

Backend engineers, database engineers, QA and architects.

Summary

All 11 entity mappings are configured inline in WorkflowDbContext.OnModelCreating; no separate entity-configuration classes were found.

Reference Content

Mapping concernVerified behavior
Default schemaOne Workflow-owned schema
KeysGUID primary keys for all mapped entities
Domain identifiersApplication-generated and marked non-generated for aggregate/entity domain types
Required/optional fieldsConfigured with fluent required flags, CLR nullability and migration nullability
Text lengthsExplicit for business/operational text fields
Enum conversionEight enum properties convert to bounded strings
Structured JSONInstance context, audit details, timeline metadata and outbox payload use structured JSON columns
PrecisionNo explicit decimal/date precision configuration
DefaultsCLR/domain initializers; no verified database default expressions
Delete behaviorCascade for definition-version-step/condition and instance-task/action ownership
Ignored stateAggregate domain-event collections are not persisted

Limitations

Configuration is centralized in a large method. No mapping tests or database check constraints were found.

Requires Confirmation

Mapping modularization, database defaults and constraint hardening require confirmation.

Source References

  • microservices/src/workflow-service/Infrastructure/WorkflowDbContext.cs
  • microservices/src/workflow-service/Infrastructure/Migrations/WorkflowDbContextModelSnapshot.cs

See Also

Keywords

Workflow database, EF Core, Workflow schema.

Revision Information

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