Skip to main content

Workflow Execution Engine

Summary​

Execution is synchronous within start and decision requests. The only asynchronous Workflow process is outbox publication; it does not advance workflow stages.

Execution flow​

Step execution​

Opening a step means creating an approval task. StepType.Notification has no different executor. StepMode is stored but not read by execution logic; same-order grouping provides actual parallel behavior.

Terminal processing​

Completion and rejection update the instance and raise domain events. DbContext maps those events to outbox messages in the same save. Workflow Service does not call source-module callback endpoints.

Failure behavior​

Application validation returns typed failure results. Malformed stored context is treated as empty. Persistence exceptions are not translated by Workflow command code.

Limitations​

There are no timers, retries for business execution, compensation, pause, cancellation, resume, callback dispatch or asynchronous engine queue.

Requires Confirmation​

Terminal consumer topology, callback ownership, transaction retry strategy and enhanced step executors require confirmation.

Source References​

  • microservices/src/workflow-service/Application/Commands/WorkflowInstanceCommands.cs
  • microservices/src/workflow-service/Domain/Workflow/WorkflowDefinition.cs
  • microservices/src/workflow-service/Domain/Workflow/WorkflowInstance.cs
  • microservices/src/workflow-service/Infrastructure/WorkflowDbContext.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