Parallel Execution allows the configuration of parallel execution lines inside the pipeline flow.

The component has 2 configuration steps: one for the parameters that define the executions general behavior and another one for the specific parameters of the execution lines.

Take a look at the configuration parameters of the component:

  • Step Name: property that can be used to document, because it turns into the component presented text in the pipeline canvas.

  • Aggregation Type: it can be configured as SUMMARY or COLLATE; see more details below.

  • Show Execution Ids: if enabled, the property will make sure that the id of each execution line is informed in the result.

  • Report Exceptions: if enabled, the property will make sure that any exceptions are informed in the result; see more details below.

Now take a look at the configuration parameters of the execution lines:

  • Description: property that can be used to document the execution lines, because it turns into the component presented text in the pipeline canvas.

  • Execution Id: defines the id of each parallel execution.

Messages flow

Input

No specific payload is expected in this component input. However, the input will be informed at each parallel execution line.

Output

  • Output with Aggregation Type = SUMMARY

In this case, only one summary about each parallel invocation will be displayed:

{
"total": 0,
"success": 0,
"failed": 0
}

A summary will be informed at the end of the execution of all the parallel lines. For an execution line to be considered as "success", a "success" property with the “true” value must be informed at the end of the execution.

  • Output with Aggregation Type = COLLATE and Show Execution Ids = true

In this case, the result of each execution will be available as an array item identified with the executionId property, which defines the path run by that execution and “result” containing its result.

[{
"executionId": "p-a",
"result": {
"parallel": "A"
}
}, {
"executionId": "p-b",
"result": {
"parallel": "B"
}
}, {
"executionId": "p-c",
"result": {
"parallel": "C"
}
}]

  • Output with Aggregation Type = COLLATE and Show Execution Ids = false

In this case, the result of each execution will be informed as an array item without specifying which path was run.

[{
"parallel": "A"
}, {
"parallel": "B"
}, {
"parallel": "C"
}]

  • Output with error and Report Exceptions = true

This case is relevant only when used with Aggregation Type = COLLATE.

If an error occurs during the execution of the p-b parallel line, the error will be informed in the output:

[{
"executionId": "p-a",
"result": {
"parallel": "A"
}
}, {
"executionId": "p-b",
"result": {
"timestamp": 99999, "error": "XXXX", "code": 999
}
}, {
"executionId": "p-c",
"result": {
"parallel": "C"
}
}]

  • Output with error and Report Exceptions = false

This case is relevant only when used with Aggregation Type = COLLATE.

If an error occurs during the execution of the p-b parallel line, null will be informed as result:

[{]
"executionId": "p-a",
"result": {
"parallel": "A"
}
}, {
"executionId": "p-b",
"result": null
}, {
"executionId": "p-c",
"result": {
"parallel": "C"
}
}]

Parallel Execution in Action

See below how the component behaves in specific situations and what its respective configurations are.

  • Putting the result of the parallel execution together

To put the result of the parallel executions together, it's important to configure the Parallel Execution component inside a Block Execution. By the end of Block Execution, all the parallel executions will be synchronized and the result will be shown.

  • Parallel Execution used in the pipeline main flow

If the component is used in the pipeline main flow, then the parallel execution lines will be "put together" by the end of the execution and the pipeline will be finished with the output result.

  • Parallel Execution used inside another Parallel Execution

In this case, new parallel execution lines will be started and "put together" by the end of the parallel execution line that had the inner Parallel Execution. The more-external Parallel Execution will put its respective lines together only when the inner ones are finished.

Did this answer your question?