Chapter 10. Advanced Orchestrations with BPEL
Introduction
This chapter picks up right where we left off. Chapter 9 got you going on BPEL basics. You saw how to install a variety of BPEL engines and how to write and deploy basic BPEL orchestrations. But BPEL is a large and complex subject, and in this chapter, we’ll look at some of the more advanced topics, including include parallel execution, timers, correlation, looping, faults, and more. Let’s jump right in.
Executing Activities in Parallel
Problem
You want to execute a set of related activities concurrently.
Solution
Use the BPEL <flow>
structured activity.
Discussion
In its simplest form, the <flow>
appears
much like a <sequence>
, in that it is merely a
container for other activities that do actual work. The difference is
that all of the items specified within the <flow>
are
executed at roughly the same time. In other words, one does not wait for
another to finish, and therefore you cannot treat the result of one
operation within a flow as the input to another. Here is an
example:
<else> <sequence name="Purchase"> <flow name="SaleCompletedNotifyFlow"> <invoke name="NotifySeller" partnerLink="contactPLink" operation="contactService" portType="ct:contactPortType" inputVariable="ContactServiceIn" outputVariable="ContactServiceOut"/> <invoke name="NotifyShipper" partnerLink="requestShippingPLink" operation="shippingService" portType="shp:shippingPortType" inputVariable="ShippingServiceIn" outputVariable="ShippingerviceOut"/> </flow> <assign ...
Get Java SOA Cookbook 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.