- Print
- DarkLight
- PDF
Overview
The Copy Task node allows you to send a copy of a task to another Process. When you use the node, the task is essentially duplicated with one copy proceeding in the current Process and a new copy being passed to another Process. The two copies are independent of one another, but unlike the Call Process node, the Copy Task node does not wait for a response from the other Process.
Settings
The Copy Task node has the following parameters:
(Optional) Title and Description: Name and details of the node.
Basic settings:
- Process to which you want to copy the task: You can select the needed Process by clicking the directory icon or by specifying its Process ID or Alias.
- (Optional) Reference of the task copy: An identifier for the copied task.
- Copy all task parameters to the new task:
- The checkbox is selected: All current task parameters will be sent along with any parameters specified in the node.
- The checkbox is cleared: Only the parameters specified in the node will be sent.
Parameters:
- Key: Key to specify variables; use a unique name. When updating existing variables, use their original names as a key.
- Value: The value you want to assign to the corresponding Key parameter. The value can be a constant, a variable reference, or a function applied to a variable.
- Type of data:
- String (S)
- Number (N)
- Boolean (B)
- Array (A)
- Object (O)
- Code editor: Shows the JSON format of the entered key and value. You can write and include additional code, which will be executed when a task enters the node.
- To add a key-value, click + Add “key-value” below the Key field.
- To delete the key-value line, click the trash icon on the right side of the key-value line.
Other:
- Alert if the number of tasks in the node queue reaches the following number: Helps monitor whether the number of tasks in the node exceeds the specified threshold. When selecting the checkbox, you have to enter the needed number of tasks in the field that appears below.
- Maximum interval, for which the task stays in the node before being forwarded: The amount of time a task is allowed to be in the node can be set in seconds, minutes, hours, and days.
Note: The checkbox has a minimum value of 30 seconds. You can set a shorter interval by using the Unixtime function.
Examples
Duplicating a task and adding a new parameter to the task copy
Description: Below, you can see the example where the Copy Task node is used to duplicate a task from the Original Process to the Destination Process.
Precondition:
- Add the Copy Task node to your Original Process.
- In Basic settings of the Copy Task node details panel, add:
- The Destination Process you want to copy a task from.
- The my_reference reference.
- Select the Copy all task parameters to the new task checkbox.
- In Parameters, add:
- The Origin parameter.
- The Hey, I’m from Copy value.
Flow: After adding a task to the Original Process, you can see that the Copy Task node not only duplicates the original task parameters but also adds some new ones. These system parameters are automatically generated by the Copy Task node and help trace the relationship between the original and copied tasks:
- copy_conv_id: Stores the ID of the Process (Original Process) from which the task was copied.
- copy_node_id: Indicates the ID of the Copy Task node that created the copied task.
- copy_ref_id: Stores the ID of the initial task from which the copy was created.
The task in the Original Process does not include the parameter that was defined within the Copy Task node but has the conveyor_copy_task_result parameter to keep track of whether the duplication was successful.
You can access a single task parameter or a whole task stored in a State Diagram by Getting Task Parameters from State Diagrams.
Error handling & troubleshooting
When an error occurs in the Copy Task node, a task goes to the auxiliary Condition output node that is used for storing error parameters.
When an error occurs during the task processing, you may see the following error parameter names in the task.
Error parameter name | Error type |
---|---|
__conveyor_copy_task_return_type_error__ | Hardware (system error), Software (error in a node logic/settings). |
__conveyor_copy_task_return_type_tag__ | *Error tag. |
__conveyor_copy_task_return_type_description__ | Error description in human-readable language; can be static or dynamic. |
*The error tag __conveyor_copy_task_return_type_tag__
may have the following values.
Value | Cause | Solution |
---|---|---|
access_denied | You don't have access to the Process you are trying to call. | Contact the Process owner to get access. |
access_denied | You are trying to send or receive tasks from another stage. | It's not allowed to get and send tasks between stages. Use the same stage to send and receive tasks. |
access_refused | The Process you are working on is not a State Diagram but it must be a State Diagram. | Check the logic of using a State Diagram. For more information, go to State Diagram. |
conveyor_is_not_active | The target Process is not active. | Make sure that the Process that you are trying to copy the task to is active. |
crash_api | Error occurred when sending the task to the Process with the Reply to Process node. | Contact your administrator for further assistance. |
no_api_callback_in_node_with_task | No API callback logic found in the node with the task. | Specify the ID or alias of the Waiting for Callback node or add this type of node. |
copy_task_timeout | Timeout when performing task copying. | Retry copying the task or contact your administrator for further assistance. |
not_unical_ref | The task reference is not unique. | Check whether there is a task with the specified reference in the Process you are attempting to copy a task to. |
wrong_validate_params | Parameter validation error. | Check the types and values of the parameters you have specified in the Copy Task node. |
copy_task_wrong_convert_param | Parameter value failed to convert with the specified parameter type. | Check and correct the data type of the parameter mentioned in the error message. |
not_found_conv_by_alias | Your alias is linked to a Process that no longer exists. | Use an existing Process. |
copy_task_size_overflow_limit | The size of the task you are trying to copy exceeds the specified limit set for your environment. | Reduce the size of your task by modifying the data or splitting it into several smaller tasks. |
duplicate_callback | You are sending the next task with the same reference while the first one is still in the Callback node. | Wait until the first task leaves the Callback node. |
conv_not_found_or_deleted | You are trying to work with a non-existent Process. | Use an existing Process. |
bad_utf8_string | The key or value you are using is not valid. | Check whether the key and value have the utf8 symbols. |
copy_task_eq_convs | You are trying to copy your task to itself. | Choose another task to copy or as a target to copy yours in. |
ref_is_not_string_format | The task reference specified in the parameters of the copied Process is incorrect. | Check whether the reference belongs to the String type of data. |
limit_delayed_tasks_to_this_user_is_overflow | There is a specified limit for the user to set the time intervals (long or short) in the Delay node | Contact your administrator for further assistance. |
bad_callback_node | The Process you are calling doesn't have the Callback node. | Create the Callback node in the Process you are calling. |
not_found_task | No task with the specified reference exists in the Process. | Make sure you entered the task reference and Process correctly. Note: An empty reference is not considered unique: if only a single task with an empty reference exists, you cannot access it by reference. |
not_found_main_node | The Start node is missing in the Process in which you are trying to copy a task. | Check whether the Start node exists in the Process you are copying to your task. |
copy_task_fatal_error | The Copy Task node error. | Check the Process to which you are trying to copy the task or contact your administrator for further assistance. |
When working with your Process or State Diagram, you may encounter the following issues.
Issue | Cause | Solution |
---|---|---|
The specified task can't be modified. | The destination Process already has a task with the same reference. | Make sure to specify a unique task reference for each task within a Process. |
The task you are trying to send to a Process does not have the input parameters required by the destination Process. | Make sure to include all the required parameters or modify the list of those. |