186 Patterns: Building Serial and Parallel Processes for IBM WebSphere Process Server V6
4. Press Ctrl+S to save the business process. Do not close the Business
Process Editor.
Adding the activities to the Business Process Editor
Now we start to add WS-BPEL activities to the Business Process Editor canvas.
We build the business process described in Figure 10-36 and in Table 10-4.
Figure 10-36 SerialProcess business process
Chapter 10. Serial Process scenario 187
Table 10-4 SerialProcess activity names and types
Renaming the existing activity
The business process already contains one activity, a receive activity. We provide
it with a more descriptive name:
1. Select the receive activity in the Business Process Editor.
2. Rename the receive activity to Receive Order Request.
Name Type
Receive Order Request Receive
Get Date From Wholesaler A Invoke
Check if the Date is OK using Business Rule Invoke
Is Date OK? Choice
True Choice case
False Choice case
Best Wholesaler is A Assign
Store date from Wholesaler A in Responses List Snippet
Get Date from Wholesaler B Invoke
Add Date from Wholesaler B to List of Responses Snippet
Pick Best Wholesaler from List using Business Rule Invoke
Update Order with Best Wholesaler Snippet
Choose Best Wholesaler Choice
Wholesaler A Choice case
Wholesaler B Choice case
Place Order with Wholesaler A Invoke
Place Order with Wholesaler B Invoke
Copy Wholesaler Confirmation into Order Assign
Notify Order Details Invoke
188 Patterns: Building Serial and Parallel Processes for IBM WebSphere Process Server V6
Adding the invoke activities
Add the invoke activities to the business process.
1. Drag an invoke activity to the canvas and rename it to Get Date From
Wholesaler A. The canvas should look like the example in Figure 10-37.
Figure 10-37 Two first activities
2. Click Get Date from Wholesaler A to highlight it.
3. Click the Properties page and the Details subtab.
4. Click Browse and select WhADeliveryPartner.
5. Verify that the operation is set to getDeliveryDays as shown in Figure 10-38.
Figure 10-38 Setting the partner, interface, and operation
6. In the Input(s) row, click the ... button to open the Select Variable window.
7. In the Select Variable for getDeliveryDaysWhReq window, select the
currentOrder variable and click OK.
8. In the Output(s) row, click the ... button.
Note: The getDeliveryDays is the only operation of WhADeliveryPartner.
Therefore, it is set as the default.
Chapter 10. Serial Process scenario 189
9. In the Select Variable for getDeliveryDaysWhRes window, select the
wholesalerResponse variable, and click OK.
10.Repeat the previous steps for the remaining invoke activities. Refer to
Table 10-5 to set the Partner, Interface, Operation, and Variables for these
activities.
Table 10-5 The SerialProcess invoke activities
Name Partner Interface Operation Input Output
Check if the Date is
OK using Business
Rule
DayCheck
Partner
ITSODate
Check_I
checkDelivery
Date
wholesaler
Response
isDateOK
Get Date from
Wholesaler B
WhBDelivery
Partner
ITSODel
Days_I
getDelivery
Days
currentOrder wholesaler
Response
Pick Best
Wholesaler from
List using Business
Rule
PickBestWh
Partner
ITSOPickBest
Wh_I
pickBestWh Multiple
Wholesaler
Dates
Multiple
Wholesaler
Dates
Place Order with
Wholesaler A
WhAOrder
Partner
ITSO_Place
Ord_I
placeOrder currentOrder wholesaler
Response
Place Order with
Wholesaler B
WhBOrder
Partner
ITSOPlace
Ord_I
placeOrder currentOrder wholesaler
Response
Notify Order Details OrderNotify
Partner
ITSOOrd
Notify_I
notifyDelivery
Date
currentOrder N/A
190 Patterns: Building Serial and Parallel Processes for IBM WebSphere Process Server V6
11.Save the business process. The invoke activities should look like the example
in Figure 10-39.
Figure 10-39 Invoke activities
Adding the assign activities
In this section, we add the assign activities to the business process. Refer to
Table 10-6 to set the Order, From Type, From Value, To Type, and To Value of the
two assign activities.
Table 10-6 The SerialProcess assign activities
Name Order From type From To type To
Best
Wholesaler is A
1 Fixed value Wholesaler A Variable currentOrder.
WhResponse.best
Wholesale
2 Variable wholesalerResponse.Wh
Response.bestWholesale
Days
Variable currentOrder.
WhResponse.best
WholesaleDays
Copy
Wholesaler
Confirmation
into Order
1 Variable wholesalerResponse.Wh
Response.confNo
Variable currentOrder.Wh
Response.confNo

Get Patterns: Building Serial and Parallel Processes for IBM WebSphere Process Server V6 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.