Guide to Building Business Processes

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Creating Parallel Paths of Execution

A Parallel node represents a point in a business process at which a number of activities are executed in parallel.

By default, parallel nodes contain an AND join condition. In this case, the activities on all branches must complete before the flow of execution proceeds to the node following the parallel node. You can change the join condition to OR. In this case, 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.

This section describes how to create and define Parallel nodes. It includes the following topics:

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:

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

Create a Parallel Node in Your Business Process

To Add A Parallel Node to Your Business Process
  1. On the Package Explorer pane, double-click the business process (Process.java file) you want to design.Your business process is displayed in the Design view.
  2. If the Node Palette is not visible in BEA Workshop for WebLogic Platform, choose WindowArrow symbolShow ViewArrow symbolNode Palette from the BEA Workshop for WebLogic Platform menu.
  3. Click Process Nodes Parallel in the Node Palette. Then drag and drop the Parallel node onto the business process in the Design view, placing it on the business process at the point in your business process at which you want to create parallel paths of execution.
  4. The Design view is updated to contain a Parallel node, as shown in Figure 7-1.

    Figure 7-1 Parallel Node


    Parallel Node

    Note the following characteristics of the Parallel node:

    • By default, a Parallel node consists of two branches; you can click Parallel Node to add branches.
    • By default, the node is named Parallel, and each branch is labeled Branch or Add Branch. You can change the names by double-clicking them and entering a new name.
    • Parallel Node indicates that the design of this node is incomplete. When you complete the design of the node, Parallel Node is replaced by Parallel Node. A parallel node is completed when each branch contains at least one node.
  5. To save your work, select FileArrow symbolSave.

Related Topics

Design Your Parallel Node

Design Your Parallel Node

Designing a Parallel node includes the following tasks:

To Define a Join Condition

A Parallel node is, in effect, a group of nodes. You can set the properties and annotations for a group of nodes using the Properties pane and Annotations pane.

  1. View the properties of your Parallel node by clicking the outline of the group to select it, then view the group properties in the Properties pane.
  2. Note: If the Properties pane is not visible in the Design view, choose WindowArrow symbolShow ViewArrow symbolProperties from the BEA Workshop for WebLogic Platform menu.
  3. To change the value of the Join Condition from AND (the default) to OR, in the Properties pane, select OR from the drop-down menu associated with Join Condition. The node in your business process will be updated with a Parallel Node to indicate the OR condition.
  4. To learn how the Join Condition affects the flow of execution in a Parallel node, see Understanding Parallel Execution in Your Business Process.

  5. To change the name of the node or any of its branches, in the Property pane, click the name attribute in the node or branch names, then enter the new name.
To Add Logic to the Branches in Your Decision Node

For each branch in your Parallel node:

  1. In the Node Palette, click a Node that represents the type of logic you want to add to the business process.
  2. Drag and drop the node from the Node Palette onto the appropriate branch, see Figure 7-2.
  3. Figure 7-2 Process Nodes


    Process Nodes

  4. Complete the design of the nodes added on each branch. In this way, you create the activities appropriate for the business logic defined by your business process.
Note: You can create nested Parallel nodes in your business process by dragging a Process NodesParallel node from the Node Palette on to one of the branches in a Parallel node already created in the Design view.
  1. To save your work, select FileArrow symbolSave.

Related Topics

Create a Parallel Node in Your Business Process

Grouping Nodes in Your Business Process

Handling Exceptions

Business Process Source Code

Adding Message Paths

Adding Timeout Paths


  Back to Top       Previous  Next