-
Print
-
DarkLight
-
PDF
Allows to modify (update) task in other available process.
There are two required requirements for modifying tasks via Modify Task
logic:
- task must be in node with Waiting for Callback or Set State logic
- specify correct task reference in
Modify Task
logic
Task reference can be specified with:
- any system parameter of the current process. For example,
{{root.ref}}
or{{root.task_id}}
- any other parameter of the current task
{{parameter_name}}
- constant. For example, config, ref etc.
Nodes in the gray box are added automatically for error handling.
Basic settings
Process - selection of a process for copying from "tree of folders". It can be found by its name or its ID or using the {{conv_id}}
(parameter of the task).
Reference - the reference of a new task that is created in another process.
New task reference can be specified by:
- any system parameter. For example,
{{root.ref}}
or{{root.task_id}}
- any other task parameter
{{parameter_name}}
- constant. For example, config, ref etc.
Copy all parameters - this option gives a possibility to copy all parameters to a new task.
If both tasks have a parameter with the same name, parameter value will be updated by Modify Task
.
Parameters that were not in the updated request will be added there.
Parameters
Button + Add "key-value" adds new parameter
Key
- parameter name
Value
can be specified by:
- constant
{{parameter_name}}
from task which name will be pasted- any system parameter of the current process. For example,
{{root.ref}}
or{{root.task_id}}
If Copy all parameters flag is enabled, it is not required to add new parameters.
Otherwise be sure to add at least one parameter.
Additionally
Alert when there is tasks queue
Critical amount of tasks in the node.
Learn more about how it works here.
Limit the time of the task in the node
Time interval value at which task will go further through process in case if Copy task logic does not reply.
Learn more about how it works here.
Synchronous callback
Synchronous callback - checking this box enables modification of tasks synchronously. It means that tasks will be updated sequentially - strictly one after another.
With that, only the tasks located in Waiting for Callback logic nodes are modified. Thus, if the specified task is located in any node of a type other than Waiting for Callback at the moment of Modify Task work, the task will not be modified and the system will display the corresponding error.
If you modify one task at the same time, the duplicate_callback
error will occur.
Modify Task operation in asynchronous and synchronous modes
In asynchronous mode (default), after receiving a task from the Corezoid API, the Modify Task node performs the following checks for the task:
-
Checking for the task in the system:
It is performed to find out if there is a task with the specified Reference number in the system. If no such task is found in the system, the current task is discarded, and the Modify Task node proceeds to process the next task received from the Corezoid API; -
Checking for the availability of a Waiting for Callback/Set State node:
It is performed to find out if there is an available Waiting for Callback or Set State node, to which the task can be sent after the processing. If such node is unavailable at the time of the check, the task is moved to one of the waiting queues*. When a queue waiting interval elapses, the task is retrieved from the waiting queue and the checks are performed for it again; -
Checking for the expected database response after Modify Task execution:
It is performed to find out if the database responds in the expected manner. If the expected response is received, the modification of the task in the database has been successful, and the task is processed further. If the expected response is not received, the task is moved to one of the waiting queues*. When a queue waiting interval elapses, the task is retrieved from the waiting queue and the checks are performed for it again.
*When point 2 or 3 check requirements are not met for the first time, the task is moved to the queue with 1-second waiting interval. After the waiting interval is over the task is retrieved and rechecked. When the requirements are not met at the second check, the task is moved to the 2-second waiting queue, and then rechecked. When the check requirements are not met for the third time, it is moved to the 3-second waiting queue. After the fourth failure to meet the check requirements, the task is deleted. Thus, the task can spend up to 6 seconds in waiting queues before being processed.
After passing through all the steps, the task is moved to Waiting for Callback or Set State target node and processed further.
Working in synchronous mode is similar to working in asynchronous mode, except that two additional operations (2 and 5) are performed on the task:
- Checking for the task in the system;
- Blocking the task processing for the Corezoid API;
- Checking for the availability of a Waiting for Callback/Set State node;
- Checking for the expected database response after Modify Task execution;
- Unblocking the task processing for the Corezoid API.
*Operation 2, blocking the task processing, allows preventing Corezoid API from sending multiple requests to the same process.
Types of error
Internal system error when copying
Parameter name | Value |
---|---|
conveyor_copy_task_return_type_error | hardware |
conveyor_copy_task_return_type_tag | copy_task_fatal_error |
conveyor_copy_task_return_description | Error running copy task |
Parameter name | Value |
---|---|
conveyor_copy_task_return_type_error | hardware |
conveyor_copy_task_return_type_tag | crash_api |
conveyor_copy_task_return_description | Error copy_task request |
Parameter name | Value |
---|---|
conveyor_copy_task_return_type_error | hardware |
conveyor_copy_task_return_type_tag | copy_task_timeout |
conveyor_copy_task_return_description | timeout for executing copy_task request |
Not found task
Parameter name | Value |
---|---|
conveyor_copy_task_return_type_error | software |
conveyor_copy_task_return_type_tag | not_found_task |
conveyor_copy_task_return_description | not found task |
There is no task with specified reference in the process.
Incorrect parameters
Parameter name | Value |
---|---|
conveyor_copy_task_return_type_error | software |
conveyor_copy_task_return_type_tag | wrong_validate_params |
conveyor_copy_task_return_description | Param: |
Failed to validate one of the parameters.
Failed to convert parameter
Parameter name | Value |
---|---|
conveyor_copy_task_return_type_error | software |
conveyor_copy_task_return_type_tag | copy_task_wrong_convert_param |
conveyor_copy_task_return_description | Param: |
For example, you parameter type is Number, but value is string or parameter is missed.
Inactive process
Parameter name | Value |
---|---|
conveyor_copy_task_return_type_error | software |
conveyor_copy_task_return_type_tag | conveyor_is_not_active |
conveyor_copy_task_return_description | conveyor is not active |
Process must be in the Active state.
Access is denied
Parameter name | Value |
---|---|
conveyor_copy_task_return_type_error | software |
conveyor_copy_task_return_type_tag | access_denied |
conveyor_copy_task_return_description | user: <user_id>, conv_id: <proc_id> |
User must have Task management access to copy task.
Task size overflow
Parameter name | Value |
---|---|
conveyor_copy_task_return_type_error | software |
conveyor_copy_task_return_type_tag | copy_task_size_overflow_limit |
conveyor_copy_task_return_description | Your task size: |
Maximum allowed size - 128 Kb.
Duplicate modification of the task
Parameter name | Value |
---|---|
conveyor_copy_task_return_type_error | software |
conveyor_copy_task_return_type_tag | duplicate_callback |
conveyor_copy_task_return_description | The last one callback is still running. You should wait |
It appears only with the flag turned on Synchronous callback. The new changement of the request will not be activated until the previous one finishes.
Standardly if this mistake occurs the request goes to the node with the logic Delay for the second try in 30 seconds.
No callback logic in node with the task
Parameter name | Value |
---|---|
conveyor_copy_task_return_type_error | software |
conveyor_copy_task_return_type_tag | no_api_callback_in_node_with_task |
conveyor_copy_task_return_description | no api callback logic in node with task |
This error occurs if Synchronous callback is enabled.
Otherwise the result is __conveyor_copy_task_result__": "ok".