Skip to main content

2. Components

Architecture diagram

Workflow engine architecture

Read it left to right. People and programs on the left call the engine in the middle. The engine keeps its records in the stores on the right.

Component reference

Callers and integrations

PartKindDescription
OperatorsPeopleWatch runs and fix problems.
DevelopersPeopleWrite workflow definitions.
Engine UIInterface for peopleOperator and developer interface: the Durable Task Scheduler dashboard and Azure Monitor workbooks initially, a Static Web App later.
Task WorkersPrograms, part of the platformImplement step types the engine cannot perform itself, such as document parsing. They run anywhere and call the engine over HTTPS.
External Eventing IntegrationsAzure servicesDeliver messages to the engine: Event Grid, Service Bus topics, Event Hubs.
External Storage IntegrationsAzure servicesAzure Blob for large data and archives; Key Vault and App Configuration for settings.
Metrics IntegrationsAzure servicesApplication Insights, Log Analytics, and Managed Grafana for measurements and logs.

Engine

PartWhat it does
APIsThe single entry point. Every call from every caller goes through it.
Task ServiceGives work to workers and takes their results.
Distributed QueuesOne waiting line per worker task type, in Service Bus. Work waits here until a worker takes it.
Workflow Execution ServiceRuns each workflow from its first step to its last.
State Machine EvaluatorThe part of the execution service that decides which step comes next.
Event adapters and Event HandlersReceive messages from outside and turn them into "start a run" or "continue a run".
Payload OffloadMoves large inputs and outputs to Blob so records stay small.
System Task WorkersThe engine's own code for generic steps: call an API, transform JSON, call a model, call a tool, call an agent, publish an event.
MetricsSends measurements to the metrics integrations.

Stores

StoreContentsService
Workflow Execution HistoryOne record per run and per stepAzure SQL
State PersistenceWhat a run needs to continue after an interruptionDurable Task Scheduler
Workflow Execution IndexThe same history, indexed for search, and mirrored to Fabric for analyticsAzure SQL
Workflow, Task, Schedule MetadataThe workflow definitions, task settings, and timersAzure SQL
Queue PersistenceThe waiting linesService Bus

Core terms

Workflow definition: the JSON file that describes a workflow. Written once, versioned.

Run: one execution of a definition with one specific input. A definition for "approve an engagement" has one run per engagement.

The next page follows one run through the diagram.