Time for action – developing parallel flows

Let's now modify the BookWarehousingBPEL process so that the BookstoreA and BookstoreB services will be invoked in parallel. We should do the following:

  1. To invoke BookstoreA and BookstoreB services in parallel, we need to add the Flow structured activity to the process flow just before the first invocation, as shown in the following screenshot:
    Time for action – developing parallel flows
  2. We can see that two parallel branches have been created. We simply drag-and-drop both the invoke activities into the parallel branches:
    Time for action – developing parallel flows

That's all! We can create more parallel branches if we need to by clicking on the Add Sequence icon.

What just happened?

We have modified the BookWarehousingBPEL process so that the BookstoreA and BookstoreB <invoke> activities are executed in parallel. A corresponding <flow>activity has been created in the BPEL source code. Within the <flow> activity, both <invoke> activities are nested. Please notice that each <invoke> activity is placed within its own <sequence> activity. This would make sense if we would require more than one activity in each parallel branch. The BPEL source code looks like the one shown in the following screenshot:

What just happened?

Deploying and testing the parallel invocation

We will deploy the project to the SOA Suite process server the same way we did in the previous sample. Then, we will log in to the Enterprise Manager console, select the project Bookstore, and click on the Test Web Service button.

To observe that the services have been invoked in parallel, we can launch the flow trace (click on the Launch Flow Trace button) in the Enterprise Manager console, click on the book warehousing BPEL processes and activate the flow view, which shows that both bookstore services have been invoked in parallel.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset