- Print
- DarkLight
- PDF
Overview
The Sum node serves multiple functions within your Processes:
- Calculates the total value of the specified parameters of the passing tasks and stores the accumulated results
- Generates statistics and monitors specific parameters
- Integrates seamlessly with other nodes and Processes, enhancing its compatibility and usability in various workflows
Unlike other nodes, in the Sum node, the total value is not added to the tasks but is stored within the node itself.
Settings
The Sum node has the following parameters:
(Optional) Title and Description: Name and details of the node.
Summation 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 or a variable reference and must have the Number type.
Note: For more information, go to Parameters and functions.
- To add a key-value, click + Add “key-value” below the Key field.
- To see the Sum ID, click the on the right side of the Value field.
- To delete the key-value line, click the trash icon on the right side of the Value field.
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
Using the Sum node as a counter
Description: In the example below, you can see how to use the Sum node as a counter.
Precondition:
- Add the Sum node to your Process.
- In Summation Parameters of the Sum node details panel, add the Count parameter and the 1 value (a positive or negative number).
Flow: Each time a task passes through the Sum node, the Counter value increases by 1, effectively counting the number of tasks that have passed through the node.
Such a counter can be used to monitor the number of payments or charges on an account or to record different types of payments/multiple accounts.
You can view the current Counter value on a Dashboard or access its value in a Process or a State Diagram.
Summing up a parameter
Description: In the example below, you can see how to use the Sum node to calculate a parameter value.
Precondition:
- Add the Sum node to your Process or State Diagram.
- In Summation Parameters of the Sum node details panel, add the Payment_total parameter and the {{amount}} value (as a variable).
Flow: Each time a task passes through the Sum node, the Sum node tracks and accumulates the values of the {{amount}} task parameter, calculates the total, and stores it in the Payment_total parameter.
You can sum multiple task parameters within the Sum parameter by using the $.math({{param1}}+{{param2}}) math function.
Error handling & troubleshooting
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_api_sum_return_type_error__ | Hardware (system error), Software (error in a node logic/settings). |
__conveyor_api_sum_return_type_tag__ | *Error tag. |
__conveyor_api_sum_return_type_description__ | Error description in human-readable language; can be static or dynamic. |
*The error tag __conveyor_api_sum_return_type_tag__
may have the following values.
Value | Cause | Solution |
---|---|---|
access_denied | You don't have access to the Process. | Contact the Process owner to give you 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 in is not a State Diagram but has to be it. | Check the logic of using a State Diagram. For more information, go to State Diagram. |
api_sum_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. |
conv_not_found_or_deleted | You are trying to work with a non-existent Process. | Use an existing Process. |
not_found_conv_by_alias | Your alias refers to a Process that no longer exists. | Use an existing Process. |
bad_callback_node | The Process you are calling doesn't have the Callback node. | Create the Callback node in the Process you are calling. |
api_sum_fatal_error | A hardware error has occurred. | Contact the support team for further assistance. |
When working with your Process, you may encounter the following issues.
Issue | Cause | Solution |
---|---|---|
The summed parameter is not a number. | A parameter in the Sum node is not of the Number type. | Change the parameter type to Number. |