Task Definition
Task Definition should pre-defined for creating the topic for worker, some default configulation that can overided on workflow definition (ackTimeout, timeout, retry.limit, retry.delay) and some documentation
Example
{
"name": "find_driver_for_delivery_foods",
"description": "Find driver for delivery foods.",
"ackTimeout": 300,
"timeout": 30000,
"retry": {
"limit": 3,
"delay": 100
},
"document": {
"inputs": [
{
"field": "pickupLocation",
"type": "mixed",
"description": "GEOJSON's point",
"required": true
},
{
"field": "deliveryLocation",
"type": "mixed",
"description": "GEOJSON's point",
"required": true
},
{
"field": "cost",
"type": "number",
"description": "Money that driver will recived when completed the job in USD",
"required": true
}
],
"outputs": [
{
"field": "driverId",
"type": "string",
"description": "ID of driver that accept the job",
"required": true
}
]
}
}Field
Description
Required
Default
name
Task's name, unique for each task.
true
description
Description of the task
true
ackTimeout
If worker not acknowledgement in x ms task will be ACK_TIMEDOUT (0 is disabled)
false
0
timeout
If worker not finished process in x ms task will be TIMEDOUT (0 is disabled)
false
0
retry.limit
Number of retry if task failed
false
0
retry.delay
Wait x ms before dispatch again
false
0
document
Document that help workflow designer create a workflow
false
Remark
At this time task definition only supported Zookeeper as store
document field might change to JSON schema in future
Last updated