Updated on 2025-05-08 GMT+08:00

Parallel Processor

The parallel processor is used to create multiple parallel processing branches so that multiple branch tasks can be executed at the same time. The merged branch execution result can be referenced using the ROMA expression ${body} in subsequent steps.

Configuration Parameters

Parameter

Description

Merge Output Format

Format of the merge result. Currently, only JSON is supported, indicating that the merge result is output in JSON character string format.

You can use either of the following methods to obtain the result of a branch:

  • If the subsequent node is Script, use JSON.parse('${body}') to convert the merge result into a JSON object, and then obtain the branch result based on the branch name. Example:

    var result=JSON.parse('${body}');

    var branch_result=result.branch name

    or

    var branch_result=result['branch name']

  • If the subsequent node is Variable Assignment, Conditions, or Data Conversion, use $.branch name to obtain the execution result of the branch.

Stop On Failure

Whether to stop the flow when an error occurs in a parallel processing branch.

  • True: When an error occurs in any parallel processor branch, the entire task stops and an error message is returned.
  • False: When an error occurs in the parallel processor branch, the entire task continues to be executed on subsequent nodes.

Timeout (ms)

Enter an integer between 0 and 60000. 0 means no timeout is set. The timeout defines the maximum allowed parallel processing time; if exceeded, the parallel task fails.

The branch name of a Parallel Processor node needs to be configured on the connection line between adjacent nodes.

Output variables

Parameter

Description

Aggregation complete time

Aggregation time in UTC after each branch is executed, for example, 2023-03-01T10:26:33.410Z.

Aggregation payload

Aggregation result after the execution of each branch.

Start time

Start time of node execution.

End time

End time of node execution.

Execution time

Node execution duration, in milliseconds.

Aggregation payload data format:

{
    "branch_1": {
        "result_1": "api 1 success"
    },
    "branch_2": {
        "result_2": "api 2 success"
    }
}