Advanced Task Manager¶
The Advanced Task Manager node obtains and maintains the task list, monitoring whether the downstream nodes have processed the task object or objects as the nodes are designed to do. The result of the execution of each object will be recorded by the Advanced Task Manager node, which can then resend the failed objects to downstream nodes for reexecution as configured. The difference between the Advanced Task Manager node and Task Manager node is that the former is a node that functionally combines multiple node functions and is oriented towards industry-level solution integration flows.
If any of the downstream node fails to process any of the task object as the node is designed to do, the task of processing this object is marked as Failed by the Advanced Task Manager node. Only when all downstream nodes succeed in processing all the task objects can the task be marked as Successful.
Node Type¶
System.
Input and Output Ability¶
This node does not have an entry point and has 1 exit point. The output is in JSON.
Every task object is identified by its unique task ID, which is stored in the output metadata and can be referred to by the expression
${metadata.taskId}
.The execution time (format: YYYYMMDDHHmm) is saved in the output metadata and can be referred to by the expression
${metadata.executionTime}
.
Node Properties¶
Name
The name for this node.
Interval
Configuring this enables the node to have a self-triggering capability, similar to the Timer node. You can choose to set a trigger frequency for minutes, hours, or days, which is stored in the metadata. The timing will start after you publish the flow.
Example: If configured to start at minute 5 for every hour and execute once every 12 minutes with the current time as 14:29 at time zone UTC+8:00, the start of the execution will be at 14:41, and the subsequent execution times will be 14:53, 15:05, 15:17, etc.
Click Check the time for the next 10 executions to see the next 10 execution timings according to your current time.
Task Type
The number of task objects the Task Manager node splits the input into. The values are as per the below.
Single Task: The Advanced Task Manager node treats the input in its entirety, passing the entire input to downstream nodes and tracking its execution result.
Multiple Tasks: The Advanced Task Manager node splits the input into multiple task objects, passes them to downstream nodes and tracks their execution results respectively.
Task List Type
A required field if Multiple Tasks is selected above.
The method of specifying the list of task objects that the Advanced Task Manager node splits the original input into.
Manual: Specify the list of task objects in Task List by entering values such as asset IDs. Arrays and JSON arrays are supported. For example: [123, 234, 345], or [{assetId:123, deviceKey:dk1}, {assetId:234, deviceKey:dk2}]. In the output, the task name will be automatically added as the key in JSON, such as: {{task: “123”, executionTime:YYYYMMDDHHmm}}
By Model: Specify the list of task objects by selecting the Model from the drop-down. If an interval is set, the task objects will automatically note the time and as per the example above, execute every hour.
By Product: Specify the list of task objects by selecting the Product from the drop-down. If an interval is set, the task objects will automatically note the time and as per the example above, execute every hour.
Policy
The way the Advanced Task Manager node deals with task objects that failed to be executed on any of the downstream nodes. If the switch is toggled on, the Advanced Task Manager node will resend the failed task objects downstream so that the failed ones can be processed again by all the downstream nodes until all the objects are successfully processed or the number of retry attempts reaches Max Retry Attempts.
Max Retry Attempts
Used together with Policy. If Retry failed tasks is toggled on, the Advanced Task Manager node will resend the failed task objects downstream so that the failed ones can be processed again by all the downstream nodes until all the objects are successfully processed or the number of retry attempts reaches Max Retry Attempts.
The maximum number of retry attempts is 5. If not specified, there will not be any retry attempts.
Description
The description for the node.
Samples¶
Input Sample¶
The following is a sample JSON array as input:
[
{
"assetId":"abc",
"timestamp":24214324324,
"measurepoints":{
"temperature":22.4,
"humidity":78
}
},
{
"externalId":"externalId",
"timestamp":24214324324,
"measurepoints":{
"speed":32,
"heat":40
},
"assetId":"assetId"
}
]
Output Sample¶
Given that the input is a JSON array, the output is multiple JSON objects split from the input:
{
"assetId":"abc",
"timestamp":24214324324,
"measurepoints":{
"temperature":22.4,
"humidity":78
}
}
{
"externalId":"externalId",
"timestamp":24214324324,
"measurepoints":{
"speed":32,
"heat":40
},
"assetId":"assetId"
}