Workflow Task Model
Summary
WorkflowTask is an entity owned by a Workflow instance and represents one approver assignment at one stage.
Fields and creation
A task stores its instance, tenant, order, name, approver type, user or role assignment, status, decision data, delegation destination and creation time. New tasks are Pending.
Mutation rules
Approval and rejection set terminal task status and decision fields. Delegation changes the user assignment, clears the role assignment, records the destination and leaves status Pending.
Query behavior
The implemented worklist returns only Pending tasks assigned to the caller email or any caller role. Instance loading includes tasks for state decisions.
Persistence
Indexes support pending task lookup by tenant/status/user and tenant/status/role. Tenant query filters apply.
Limitations
The Delegated and Skipped status values are not assigned by the implemented mutations. There is no due date, priority, claim, escalation, concurrency token or general task-history query.
Requires Confirmation
Task concurrency, delegation history, stale-task cleanup and completed-task reporting require confirmation.
Source References
microservices/src/workflow-service/Domain/Workflow/WorkflowInstance.csmicroservices/src/workflow-service/Domain/Common/Enums.csmicroservices/src/workflow-service/Application/Queries/WorkflowQueries.csmicroservices/src/workflow-service/Infrastructure/WorkflowDbContext.cs
Related Articles
See Also
Keywords
Workflow architecture, approval engine, Workflow Service, technical foundation.
Revision Information
- Status: Draft
- Last reviewed: 2026-07-20
- Next review: 2026-10-20