-
Notifications
You must be signed in to change notification settings - Fork 273
Out of Proc Orchestrator Execution Schema Reference
Out of proc orchestrator functions, such as those that run in Node.js, communicate with the Functions host process and the Durable Functions extension by consuming a provided execution history and returning information about the orchestrator execution. If you are developing a library to write orchestrator functions in a language that the Azure Functions host runs out of process (ex. JavaScript/Node.js), an orchestrator execution's return value must conform to this schema. The JSON schema is at http://json.schemastore.org/host.
🚧 This schema is currently in public preview and subject to change. 🚧
The following sample JSON shows a sample execution result. All fields are required.
{
"isDone": false,
"actions": [
[
{
"actionType": 0,
"functionName": "E4_SendSmsChallenge",
"input": "+14562345678"
}
],
[
{
"actionType": 5,
"fireAt": "2018-04-24T01:12:01.083Z",
"isCanceled": false
},
{
"actionType": 6,
"externalEventName": "SmsChallengeResponse"
}
]
],
"output": null
}
The following sections of this article explain each top-level property.
Specifies whether this is the last execution of this orchestrator instance. When this value
is true
, the Durable Functions extension will consider the orchestration instance completed
and will attempt to return the output
value.
{
"isDone": false
}
An ordered list of async actions the orchestrator function should perform. This list is append-only; that is, it must contain all scheduled async actions up to the latest requested work, even actions that have already been completed.
Actions are grouped by execution. Each subsequent orchestrator execution should add a new array of action objects to the collection.
{
"actions": [
[
{
"actionType": 0,
"functionName": "E4_SendSmsChallenge",
"input": "+14562345678"
}
],
[
{
"actionType": 5,
"fireAt": "2018-04-24T01:12:01.083Z",
"isCanceled": false
},
{
"actionType": 6,
"externalEventName": "SmsChallengeResponse"
}
]
]
}
Property | Description |
---|---|
actionType | The type of action to perform; e.g. CallActivityAsync |
functionName | The name of the orchestrator or activity function to run. |
input | The JSON-serializable input to pass to the orchestrator or activity function. |
isCanceled | CreateTimer action only. Whether the timer has been canceled. |
fireAt | The time at which the timer should expire. |
externalEventName | The name of the event to wait for. |
Action Type | Accepted Values | Required Fields |
---|---|---|
Call Activity |
0 , callActivity
|
actionType, functionName, input |
Create timer |
5 , createTimer
|
actionType, fireAt, isCanceled |
Wait for external event |
6 , waitForExternalEvent
|
actionType, externalEventName |
The JSON-serializable value returned by the orchestrator instance on completing execution.
{
"output": true
}