Controlling Process Flow—Parallel gateways
Task # 3, Quote Approval has 2 parallel tasks:
Deal Step Approval
Term Step Approval
They need to be performed in parallel by the Approvers and Contracts roles.
How to do it...
I. Create a Parallel gateway
1. Move to Component Palette | BPM | Activities.
2. Click Gateways, and select Parallel Gateway.
3. Drag it to the Project Editor, in the Approvers swimlane.
4. Enter basic information into the properties dialog of the gateway, such as:
Name: Approvals
5. When you have finished the preceding steps, click Save.
II. Create a User task
Note
You need to create two User tasks in the Process Model, which will perform the Approval deal and Approval terms tasks, by the Approvers and Contracts roles, respectively.
1. Go to Component Palette | BPM | Activities.
2. Click User task in interactive activities.
3. Click in the Approvers swimlane, where you want to position this User task.
4. Enter the following details in the Properties dialog of the User task:
In the Base tab, enter Name as
Approve Deal
In the Implementation tab, leave the default, as we will implement it in the implementation phase of the development cycle
5. When you have finished the preceding steps, click Save.
6. Go to Component Palette | BPM | Activities.
7. Click User task in interactive activities.
8. Click on the Approvers swimlane, at the point where you want to position this User task.
9. Enter the following details in the Properties dialog of the User task:
In the Base tab, enter Name as Approve Terms
In the Implementation tab, leave the default, as we will implement it in the implementation phase of the development cycle.
10. When you have finished, click Save.
III. Create sequence flows
Create unconditional sequence flows from the Approvals Parallel gateway to Approve Deal and Approve Terms User tasks.
1. Click on the sequence flow on top of the Process Editor.
2. Create a Sequence flow (Unconditional) from the Approvals Parallel gateway in the Approvers swimlane to the Approve Deal User task.
3. Similarly, create a Sequence flow (Unconditional) from the Approvals Parallel gateway in the Approvers swimlane to the Approve Terms User task.
4. When you have finished the preceding steps, click Save.
IV. Create Process Data objects
Create Process Data objects to store the outcome of the Approve Deal and Approve Terms User tasks.
1. Click the process name SalesToContract in the Project navigator.
2. You can check the open Structure panel at the lower-left corner of the JDeveloper screen.
3. In the Structure panel, on the lower-left side, right-click the Process Data object, and click New, to create a new Data object.
4. Enter the following details for the Process data object:
Data object name:
approveDealOutcome
Type: String
Enable Auto Initialize
5. Enter Following Details for the Process data object :
Data Object name :
approveTermsOutcome
Type: String
Enable Auto Initialize
6. When you have finished the preceding steps, click Save.
How it works...
The Parallel Gateway guides the process token to perform two or more tasks simultaneously.
The Parallel Gateway:
Splits your process into two or more paths when you want your Process Flow to follow all paths simultaneously
When a token reaches a parallel gateway, the parallel gateway creates a token for each outgoing sequence flow