Updated on 2023-12-28 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 task when an error occurs during parallel processing.

  • 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)

Maximum execution time of the parallel processing, within which if a branch task is not completed, the branch task will be discarded and excluded in the final merge result.

If this parameter is set to 0, the system waits till all branch tasks are complete.

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