# Understanding Parallel Execution in Your Business Process

Parallel branches of execution in a business process are logically parallel; physically the branches are executed serially by the business process engine. Business Processes benefit from this logical parallelism when communication with external systems can involve waiting for responses from those external systems. While one branch of execution is waiting for a response, another branch of execution in the parallel flow can progress.

Parallel branches are synchronized only at their termination points. A join condition is defined at the termination of multiple branches. It specifies how the termination of branches terminates the overall parallel activity.

Valid join conditions are AND and OR:

- When the join condition is AND, the parallel activity terminates when all of its branch activities have terminated. When the activities on all branches complete, the flow of execution proceeds to the node that follows the parallel node.
- When the join condition is OR, the parallel activity terminates when one of its branch activities has terminated—activities associated with other branch activities are terminated prematurely. In other words, when the activities on one branch complete, the flow of execution proceeds to the node that follows the parallel node.

Comparing Parallel Nodes and Event Choice Nodes

How does a Parallel node, which specifies an OR join condition, differ from an Event Choice node?

For a scenario in which an OR join condition is specified for a Parallel node, the business process executes activities on all branches in parallel. When the activities on one branch complete, the execution of activities on all other branches terminates, and the flow of execution proceeds to the node following the Parallel node. In other words, the activities on all parallel branches are initiated and proceed until the first one finishes, at which point the activities on all other branches are terminated.

In the case of an Event Choice node, the business process waits to receive multiple events. The first node on each branch within an Event Choice node handles the receipt of one event. The flow of execution proceeds along the branch containing the event that happens first. In other words, the activities on one, and only one branch in an Event Choice node are executed.

Related Topics

Create a Parallel Node in Your Business Process

Design Your Parallel Node