Aggregation Node
The Aggregation node can aggregate the output of multiple branches, facilitating unified configuration of subsequent nodes.
If multiple branches are designed in a workflow, a node is required to summarize the output results of all branches. In this scenario, you can use the Aggregation node to aggregate the output variables of multiple branches. The Aggregation node reads the first non-null value from multiple branches for the downstream nodes to use and operate. You do not need to process the output results of the branches that are not running, simplifying data flow management.
The Aggregation node is an optional node. If it does not need to be configured, skip this section.
To configure the Aggregation node, perform the following steps:
- Drag the Aggregation node on the left to the canvas and click the node to open the node configuration page.
- Configure the Aggregation node by referring to Table 1.
Table 1 Aggregation node configuration Configuration Type
Parameter Name
Description
Configuration Example (Scenario-based)
Parameter configuration
Output params
- Param name: The value is fixed to Group1. If there are multiple groups, set them as Group2, Group3, and so on, according to the number of groups.
- Param type: depends on the variable data type of the corresponding aggregation group.
/
aggregate policy
-
You can specify a policy to aggregate all variables in each group. The aggregation policy is applied to variables in the same group.
Currently, the aggregation policy can only be set to First not null. You can drag variables and adjust the variable positions. For example, if three variables output1, output2, and output3 are set in sequence in a group and are aggregated into one variable Group1, the value of output1 is used to assign a value to Group1 if output1 is not empty. If output1 is empty, the value of output2 is used, and so on.
Currently, the aggregation policy can only be set to First not null.
Aggregation group
-
By default, there is only one group Group1, which corresponds to one output variable Group1. All variables in the group are of the same type. If multiple variables need to be output, you can add multiple groups, which are named Group2, Group3, and so on.
/
Aggregation variable
-
Select the variables to be aggregated in the aggregation group. Each group can aggregate variables of only one data type. For example, multiple variables of the String type are aggregated into a String variable, and multiple variables of the Integer type are aggregated into an Integer variable.
For example, the Branch node or IntentDetection node splits a workflow into multiple branches. Each time the workflow is executed, the workflow determines to run a branch based on the branch condition or user intent. In this case, the output variables of other branches that are not executed are empty. You can connect multiple branches to the Aggregation node and set an output variable. No matter which branch is executed, the result can be referenced and accessed through the variable, avoiding repeated definition of the same semantic output variable by downstream nodes.
Figure 1 Aggregation node configuration example - After completing the configuration, click OK.
- Connect the Aggregation node to other nodes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot