Skip to main content

5. Task types

Groups

Every task has a type. Types fall into three groups by who performs them:

  • Interpreter types control the flow. The engine handles them without calling anything.
  • Activity types call something: an API, a model, a tool, a topic. The engine runs them itself.
  • The worker type hands the step to your own program.

Interpreter types

Type is the value of the task's type field. Fields lists the properties the task must carry in addition to type and taskReferenceName.

TypeBehaviourFields
SWITCHPicks one branch from a valueon, cases, defaultCase
FORK_JOINRuns several branches at once and waits for allforkTasks
FORK_JOIN_DYNAMICSame, with the branch list taken from a previous outputdynamicForkTasksParam
DO_WHILERepeats its tasks while a condition holds, up to a boundloopCondition, loopOver, maxIterations
WAITPauses for a duration or until a timeduration or until
HUMANPauses until a decision is posted. Page 10.
SUB_WORKFLOWRuns another definition and waits for itsubWorkflowParam.name, .version
SET_VARIABLEUpdates run variablesinputParameters = the new values
TERMINATEEnds the run with a given statusterminationStatus, workflowOutput
NOOPDoes nothing

Activity types

Input lists the keys of inputParameters; Output lists the keys of the task's output that later tasks can reference.

TypeBehaviourInputOutput
HTTPCalls a URL through the gatewayuri, method, headers, bodystatus, headers, body
JSON_TRANSFORMExtracts and reshapes JSON with JSONPathsource, expressionsThe constructed object
LLM_CHATSends messages to a modelmodel, messages or instructions + context, tools, maxTokens, temperature, responseSchematext, toolCalls, usage
LIST_TOOLSLists the tools the workflow may usetools
CALL_TOOLCalls one tooltool, argumentsThe tool's result
CALL_AGENTSends a goal to an agent hosted outside the engine and waits for its result. Page 14.agent, prompt, context, executionId (resume), timeoutSecondsexecutionId, state, text, output
PUBLISH_EVENTPublishes a message to a topictopic, payloadmessageId
START_WORKFLOWStarts another run without waitingname, version, input, correlationIdworkflowId
PULL_MESSAGESReads messages sent to this runmaxCountmessages

HTTP is also how the engine reaches Logic Apps connectors (for SaaS systems) and Azure AI Document Intelligence (for documents). No special task type is needed.

The worker type

TypeBehaviour
WORKERPuts the step on the queue for its task type and waits for a worker to post the result. Page 9.

The field name gives the task type name, for example parse_pdf. The queue, the settings, and the worker all use that name.

Excluded types

Not offeredUse insteadReason
Inline scripts in the definitionA worker, the action service, or a Logic Apps connectorKeeps logic in tested, versioned code. No script engine in the engine.
Direct database tasksA tool on the action serviceAll data changes go through one audited path.
Remote agent protocol tasksDeferredAdded when the first external agent must be called.