Workflow Commands
Summary
Commands are public async methods on two scoped classes rather than command records dispatched through a mediator.
Definition commands
| Method | Verified responsibility |
|---|---|
CreateAsync | Validate key/name/type data, create Draft v1, write audit/timeline and save |
UpdateAsync | Load definition, update details, optionally replace editable draft steps and save |
PublishAsync | Publish the current nonempty draft and save |
Instance commands
| Method | Verified responsibility |
|---|---|
StartAsync | Resolve definition/version, create instance, open first applicable stage or complete |
ApproveAsync | Approve Pending task, advance stage or complete |
RejectAsync | Reject Pending task and terminate instance |
DelegateAsync | Reassign Pending task and preserve Pending status |
Shared behavior
All commands require tenant context. Actor identity defaults to a system label when email is absent. Mutations use repositories and a unit-of-work; audit and timeline entries are staged before save.
Limitations
There are no commands for archive, cancel, reopen, pause, resume, retry, clone, delete, bulk decisions or notification steps.
Requires Confirmation
Command authorization, idempotency keys and concurrency strategy require confirmation.
Source References
microservices/src/workflow-service/Application/Commands/WorkflowDefinitionCommands.csmicroservices/src/workflow-service/Application/Commands/WorkflowInstanceCommands.csmicroservices/src/workflow-service/Application/Common/Abstractions.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