Skip to main content

Workflow Commands

Summary

Commands are public async methods on two scoped classes rather than command records dispatched through a mediator.

Definition commands

MethodVerified responsibility
CreateAsyncValidate key/name/type data, create Draft v1, write audit/timeline and save
UpdateAsyncLoad definition, update details, optionally replace editable draft steps and save
PublishAsyncPublish the current nonempty draft and save

Instance commands

MethodVerified responsibility
StartAsyncResolve definition/version, create instance, open first applicable stage or complete
ApproveAsyncApprove Pending task, advance stage or complete
RejectAsyncReject Pending task and terminate instance
DelegateAsyncReassign 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.cs
  • microservices/src/workflow-service/Application/Commands/WorkflowInstanceCommands.cs
  • microservices/src/workflow-service/Application/Common/Abstractions.cs

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