Workflow Reference Storage
Summary
Source-backed persistence of the workflow linkage carried by the Asset aggregate — a single optional workflow-instance identifier and its index. There is no separate workflow table in this database; the reference is a column on the asset row.
Audience
Backend engineers, database reviewers, architects, QA, support, operations, security reviewers, and product owners.
Overview
When an asset's approval is delegated to the Workflow Service, the asset records the identifier of the workflow instance that governs that decision. This linkage is stored as a nullable Guid column (WorkflowInstanceId) on the Assets table — not as a separate entity or table. The workflow instance itself is owned by the Workflow Service; the asset holds only the reference.
Confirmed persistence behavior
| Field | Storage | Required | Notes |
|---|---|---|---|
| WorkflowInstanceId | Guid on the Assets row | No | Set when approval is delegated to the Workflow Service; identifier-only |
- Location:
WorkflowInstanceIdis a column on theAssetaggregate (theAssetstable), not a separate workflow table. - Index:
IX_Assets_WorkflowInstanceindexes the column. - When set: the identifier is populated when approval for the asset is delegated to the Workflow Service.
- Managed indicator: an asset is treated as workflow-managed when
WorkflowInstanceIdis set and itsStatusisRequested. This is a computed condition (IsWorkflowManaged), not a persisted column. - Callback idempotency: workflow callbacks are idempotent — when the asset's
Statusis no longerRequested, the callback is acknowledged without re-applying the decision. - Retained for traceability: the identifier is kept on the row after the decision is made, providing a durable link back to the governing workflow instance.
- Identifier-only boundary: there is no foreign key from this database to the Workflow Service. The value is a plain identifier, and there is no reconciliation of the referenced instance from this service.
Classification
Implemented identifier-only cross-service reference on the aggregate.
Requires confirmation
Whether the workflow linkage requires reconciliation or lifecycle cleanup after a decision is not decided in source and requires confirmation.
Diagram
Related Articles
See Also
Keywords
- Workflow reference
- Workflow Reference Storage
- Draft database documentation
Source References
microservices/src/asset-service/Domain/Asset/Asset.csmicroservices/src/asset-service/Infrastructure/AssetDbContext.csmicroservices/src/asset-service/Application/WorkflowIntegration.csmicroservices/src/asset-service/Infrastructure/WorkflowServiceClient.cs
Revision Information
- Status: Draft
- Last reviewed: 2026-07-17
- Review cycle: Quarterly