Workflow Definition
Workflow Definition define how task will run
Example
{
"name": "test",
"rev": "simple",
"description": "No description",
"tasks": [
{
"name": "task-1",
"taskReferenceName": "task-1",
"type": "TASK",
"inputParameters": {
"userId": "${workflow.input.user._id}"
},
"retry": {
"limit": 3, // This will overide task difinition
"delay": 1, // This will overide task difinition
},
"ackTimeout": 500, // This will overide task difinition
"timeout": 5000 // This will overide task difinition
},
{
"name": "task-2",
"taskReferenceName": "task-2",
"type": "TASK",
"inputParameters": {
"userId": "${workflow.input.user._id}"
}
},
{
"name": "task-3",
"taskReferenceName": "task-3",
"type": "TASK",
"inputParameters": {
"userId": "${workflow.input.user._id}"
}
}
],
"failureStrategy": "COMPENSATE",
"outputParameters": {
"transactionId": "${workflow.transactionId}",
"task-1-input": "${task-1.input}",
"task-2-output-hello": "${task-2.output.hello}",
"when-task-2-completed": "${task-2.endTime}"
}
}Field
Description
Required
Default
name
Workflow's name.
true
rev
Workflow's revision, workflow can have multiple revision
true
description
Description of the workflow
true
tasks
An array of tasks
true
failureStrategy
How to handle when workflow failed
false
FAILED
outputParameters
Map output of workflow from tasks
false
{}
Last updated