Professional Documents
Culture Documents
Ionut Subasu
ETH Zurich WS&SOA FS2010 1
Outline
Short Intro Basic BPEL process Using Operators Invoking Services Adding control structures Executing activities in parallel Signaling faults Undoing steps
ETH Zurich WS&SOA FS2010 2
For clients the BPEL process looks like any other WebService
Partner Links
Used to
invoke operations on other web services receive invocations from clients or other web services
BPEL - Activities
BPEL has a set of primitive steps
Basic constructs and are used for basic tasks
<receive> - wait for a client to make a request <reply> - generate a response <assign> - manipulate data variables <invoke> - invoke other web service <throw> - raise a fault or exception <wait> - a short period of time <terminate> - end the entire process
ETH Zurich WS&SOA FS2010 5
Assign Activity
Allows to
copy data from one variable to another insert new data using expressions
10
Control Structures
BPEL uses various expression types
Boolean (while, switch, if) Deadline-valued (until) Duration-valued (for)
11
12
Flow
Provides concurrency and synchronization
<sequence> <flow standard-attributes> <invoke partnerLink="Seller" .../> <invoke partnerLink="Shipper" .../> </flow> <invoke partnerLink="Bank" .../> </sequence>
13
14
Handling Failures
Signaling Faults
The throw activity can be used to signal internal faults explicitly
<throw faultName="qname" faultVariable="ncname"? standard-attributes> standard-elements </throw>
Compensation Handlers
Can be called to reverse the actions of a scope or invocation
<compensationHandler>? <invoke partnerLink="Seller" portType="SP:Purchasing operation="CancelPurchase" inputVariable="getResponse" outputVariable="getConfirmation"> </compensationHandler>
16
Handling faults
This demo shows how to deal and raise with faults. Once an fault was raised we do a compensate action for the inner scope that contains the invoke to the hello service
ETH Zurich WS&SOA FS2010 17
True for very simple processes BPEL processes are portable even outside Java It is designed for business processes
Business processes must also react to alarms or message events Built in support for concurrent activities. BPEL processes are statefull for the duration of the process BPEL cant replace Java
ETH Zurich WS&SOA FS2010 18
synchronization primitives
References
Short Intro to BPEL
http://www.theserverside.com/news/1364554/BPEL-and-Java
All the sources for the current demo can be found on the lecture web page
19