Simple Nodes
Simple nodes share many of the common settings described in Node Basics, but differ in small ways depending on their function. The settings described below are settings unique to each node.
Set Parameter
The Set Parameter node allows you to set a parameter or modify the value of a parameter within the task. In the Parameters section, declare new parameters using key-value pairs. You can use placeholders and functions to generate new values in the task or update existing ones. This node is only available for building processes.
Condition
The Condition node evaluates logic and directs the process or state diagram according to this evaluation. In effect, it recreates an if statement and executes a path when a statement is fulfilled. To add a conditional go to the Condition section of the settings box:
- Add a previously declared parameter in the Key box. This will be the variable you are evaluating. You cannot compare a constant to a constant.
- Select the logical operator you want to use:
==
;!=
;>
or<
. You may also Regular Expression to match patterns using theRegExp
option. - Enter the value to compare the parameter to in the Value box.
- If you would like to add an additional AND (
&&
) condition, where both statements need to be true for the desired path to be followed, select+ Add parameter
. - If you would like to add an OR conditional, so that if one or both conditions trigger the desired path, select
+ Add condition
and ensure that both paths lead to the same place. - You may also add another condition if you would like another conditional that leads to another node.
Copy Task
The Copy Task node allows you to create a new task in a process or state diagram, using the values in the current task. You may also copy the entire task or just a subset of the available fields. In the settings box, select the process you want to copy in Basic Settings > Alias or process and add the reference of the task in the Reference input.
Modify Task
The Modify Task node allows you to modify a separate task. The task being modified needs to have a Waiting for Callback node.
In the settings box, select the process or state diagram you want to modify in Basic Settings > Alias or process and add the reference of the task in the Reference input. To set new parameters go to the Parameters section and add new values. This will overwrite any old parameters that the process or state diagram had or create new ones.
The task to be modified can be in any process or state diagram that has a Waiting for Callback or Set State node and it needs to be specified by the reference ID.
The Synchronous callback option in the Additionally section allows you to detect when you are attempting to modify a task that is currently being modified. Enabling this option makes this node return an error when multiple modifications are being made to the same task at the same time.
Waiting for Callback
The Waiting for Callback node allows you to wait for a reply from a request made to an external system. This node freezes the task while waiting for a response and is a required component when using the Modify Task node. Your callback should be sent to the Corezoid URL shown in the node settings tab. Use URL API callback > Corezoid > Copy to copy this URL to your clipboard.
You can set the wait time for the node by changing the value under Additionally > Limit the time of the task in the node.
Delay
The Delay node delays a task at a specific point. The time interval for the delay can be set in seconds, minutes, hours, or days and the delay cannot be less than five seconds.
Enter the numerical value or a parameter in the input box below Limit the time of the task in the node and change the time scale in the dropdown next to the input box. If you use a parameter, it must contain a date and time in the unix time format plus the delay to add to this time. You may use the $.unixtime()
function to get the current time.
End
The End node ends a process or state diagram and comes in two types: Error or Success. An End: Error node labels tasks that end with an error and End: Success nodes labels tasks that end successfully. Note that these nodes have no intrinsic meaning to the system and are used to label different outcomes.
Responses
Return Type Error | Return Type Description | Return Type Tag | Cause |
---|---|---|---|
access_denied | user: <user_id>, conv_id: <proc_id> | software | The user does not have access rights to the target process. |
copy_task_fatal_error | Error running copy task | hardware | An internal system error occurred when modifying the task. |
copy_task_timeout | timeout for executing copy_task request | hardware | A timeout occurred when modifying the task. |
copy_task_size_overflow_limit | Your task size: bytes, Max available task size: <max_size> bytes, Try to change your data or try to split your task | software | The task size exceeds 128kb |
copy_task_wrong_convert_param | Param: <parameter>, Value: <value>, Try convert to: <option> | software | Failed to convert the parameter when the parameter type is different from the value (For example, the parameter type is Number, but the value is string.) |
conveyor_is_not_active | conveyor is not active | software | The target process is not in an Active state. |
crash_api | Error copy_task request | hardware | An internal system error when modifying the task. |
duplicate_callback | The last callback is still running. You should wait. | software | This appears when Synchronous callback is enabled. The new change request will only start when the previous one finishes. |
no_api_callback_in_node_with_task | No api callback logic in node with task | software | The target process has no Waiting for Callback node. |
not_found_task | Not found task | software | There is no task with the specified reference. |
wrong_validate_params | Param: <parameter>, Error: <error> | software | Failed to validate one of the parameters. |
Sum
The Sum node sums the value of parameters or constant numbers and returns the summed value as a parameter. This node is only available for building processes.
Set State
The Set State node allows you to set a state or modify the value of a state in a state diagram. This node can receive an incoming stream of data and modify it, using Conditions in the settings of the node, to be saved in different states. This node can only be used in state diagrams.