Web Services Business Process
Execution Language Version 2.0
Primer
9 May 2007
Document identifier:
wsbpel-primer
Location:
http://docs.oasis-open.org/wsbpel/2.0/Primer/wsbpel-v2.0-Primer.doc
http://docs.oasis-open.org/wsbpel/2.0/Primer/wsbpel-v2.0-Primer.pdf
http://docs.oasis-open.org/wsbpel/2.0/Primer/wsbpel-v2.0-Primer.htm
Editors and Contributors:
Charlton Barreto, Adobe Systems, Inc. <cbarreto@adobe.com
>
Vaughn Bullard, Amberpoint <vbullard@amberpoint.com>
Thomas Erl, SOA Systems <thomas.erl@soasystems.com
>
John Evdemon, Microsoft <John.Evdemon@microsoft.com>
Diane Jordan, IBM <drj@us.ibm.com
>
Khanderao Kand, Oracle, <khanderao.kand@oracle.com
>
Dieter König, IBM <dieterkoenig@de.ibm.com>
Simon Moser, IBM <smoser@de.ibm.com
>
Ralph Stout, iWay Software <ralph_stout@ibi.com
>
Ron Ten-Hove, Sun <Ronald.Ten-Hove@sun.com
>
Ivana Trickovic, SAP <ivana.trickovic@sap.com
>
Danny van der Rijn, TIBCO Software <dannyv@tibco.com
>
Alex Yiu, Oracle <alex.yiu@oracle.com
>
WS-BPEL 2.0 Primer 9 May 2007
Copyright © OASIS Open 2007. All Rights Reserved. Page 1 of 66
Abstract:
The WS-BPEL 2.0 specification [WS-BPEL 2.0] provides a language for formally
describing business processes and business interaction protocols. WS-BPEL was
designed to extend the Web Services interaction model to support business transactions.
The WS-BPEL Primer is a non-normative document intended to provide an easy to read
explanation of the WS-BPEL 2.0 specification. The goal of this document is to help
readers understand the concepts and major components of the WS-BPEL language. This
document will also assist readers in recognizing appropriate scenarios for using WS-
BPEL. This document describes several features of WS-BPEL using examples and
extensive references to the normative specification.
Status:
This is the approved version of the WS-BPEL 2.0 Primer.
WS-BPEL 2.0 Primer 9 May 2007
Copyright © OASIS Open 2007. All Rights Reserved. Page 2 of 66
Notices
OASIS takes no position regarding the validity or scope of any intellectual property or other
rights that might be claimed to pertain to the implementation or use of the technology described
in this document or the extent to which any license under such rights might or might not be
available; neither does it represent that it has made any effort to identify any such rights.
Information on OASIS's procedures with respect to rights in OASIS specifications can be found
at the OASIS website. Copies of claims of rights made available for publication and any
assurances of licenses to be made available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by implementers or users of this
specification, can be obtained from the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any copyrights, patents or patent
applications, or other proprietary rights which may cover technology that may be required to
implement this specification. Please address the information to the OASIS Executive Director.
Copyright © OASIS Open 2007. All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works
that comment on or otherwise explain it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of any kind, provided that the
above copyright notice and this paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way, such as by removing the
copyright notice or references to OASIS, except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined in the OASIS Intellectual
Property Rights document must be followed, or as required to translate it into languages other
than English.
The limited permissions granted above are perpetual and will not be revoked by OASIS or its
successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and OASIS
DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
WS-BPEL 2.0 Primer 9 May 2007
Copyright © OASIS Open 2007. All Rights Reserved. Page 3 of 66
Table of Contents
1. Introduction................................................................................................................................. 6
1.1. Terminology......................................................................................................................... 6
1.2. Objective .............................................................................................................................. 6
1.3. Non-Normative Status ......................................................................................................... 6
1.4. Relationship to the WS-BPEL Specification ....................................................................... 6
1.5. Outline of this Document..................................................................................................... 6
2. History of WS-BPEL .................................................................................................................. 8
2.1. Design Goals........................................................................................................................ 8
2.2. XLANG and WSFL .............................................................................................................8
3. Basic Concepts............................................................................................................................ 9
3.1. The Structure of BPEL Processes ........................................................................................ 9
3.2. Relationship to Business Partners........................................................................................ 9
3.3. State of a BPEL Process .................................................................................................... 10
3.4. Behavior of a BPEL Process.............................................................................................. 11
3.4.1. Providing and Consuming Web Services ............................................................. 11
3.4.2. Structuring the Process Logic ............................................................................... 13
3.4.3. Repetitive Activities.............................................................................................. 14
3.4.4. Parallel Processing................................................................................................ 15
3.4.5. Data Manipulation ................................................................................................ 18
3.4.6. Exception Handling .............................................................................................. 19
4. Advanced Concepts I ................................................................................................................ 21
4.1. Refining the Process Structure........................................................................................... 21
4.1.1. Lifecycle of a Scope.............................................................................................. 21
4.1.2. Scoped Fault Handling.......................................................................................... 22
4.1.3. Terminating Running Work.................................................................................. 22
4.1.4. Undoing Completed Work.................................................................................... 23
4.1.5. Event Handling ..................................................................................................... 24
4.2. Advanced Web Service Interactions.................................................................................. 24
4.2.1. Selective Event Processing ................................................................................... 24
4.2.2. Multiple Event Processing .................................................................................... 25
4.2.3. Concurrent Event Processing................................................................................ 26
4.2.4. Message Correlation ............................................................................................. 27
4.2.5. Concurrent Message Exchanges ........................................................................... 29
4.3. More Parallel Processing ................................................................................................... 30
4.4. Delayed Execution ............................................................................................................. 32
4.5. Immediately Ending a Process........................................................................................... 32
4.6. Doing Nothing ................................................................................................................... 33
4.7. Data Validation .................................................................................................................. 33
4.8. Concurrent Data Manipulation .......................................................................................... 34
4.9. Dynamic Business Partner Resolution............................................................................... 35
5. Advanced Concepts II............................................................................................................... 38
5.1. Language Extensibility ...................................................................................................... 38
5.1.1. Expression Languages and Query Languages ...................................................... 38
5.1.2. Elements and Attributes of Other Namespaces .................................................... 38
5.2. Abstract Processes ............................................................................................................. 40
WS-BPEL 2.0 Primer 9 May 2007
Copyright © OASIS Open 2007. All Rights Reserved. Page 4 of 66
5.2.1. The Common Base................................................................................................ 40
5.2.2. Abstract Process Profile for Observable Behavior ............................................... 41
5.2.3. Abstract Process Profile for Templates................................................................. 43
6. Using WS-BPEL....................................................................................................................... 44
6.1. Applying WS-BPEL to our scenario.................................................................................. 44
6.1.1. Introduction........................................................................................................... 44
6.1.2. The TimesheetSubmission Process....................................................................... 45
6.1.3. Getting Started: Defining the process element ..................................................... 48
6.1.4. Defining partnerLinks........................................................................................... 48
6.1.5. Defining partnerLinkTypes................................................................................... 49
6.1.6. Defining variables................................................................................................. 49
6.1.7. Using getVariableProperty function ..................................................................... 50
6.1.8. Defining Process Logic......................................................................................... 50
6.1.9. Defining a sequence activity................................................................................. 50
6.1.10. Defining an if activity ........................................................................................... 51
6.1.11. Defining a while activity....................................................................................... 51
6.1.12. Defining a repeatUntil activity.............................................................................. 52
6.1.13. Defining a forEach activity................................................................................... 52
6.1.14. Defining assign activities...................................................................................... 54
6.1.15. Interacting with Partners ....................................................................................... 54
6.1.16. Defining an invoke activity................................................................................... 55
6.1.17. Defining a receive activity .................................................................................... 55
6.1.18. Defining a reply activity ....................................................................................... 55
6.1.19. Elaborating and Refining Process Logic............................................................... 55
6.1.20. Defining a pick activity......................................................................................... 56
6.1.21. Defining a flow activity ........................................................................................ 56
6.1.22. Defining a wait activity......................................................................................... 58
6.1.23. Defining faultHandlers - catch, and catchAll ....................................................... 59
6.1.24. Defining a validate activity................................................................................... 59
6.1.25. Defining a compensationHandler ......................................................................... 59
7. What’s new in WS-BPEL 2.0 ................................................................................................... 61
8. Summary................................................................................................................................... 63
8.1. Benefits of WS-BPEL........................................................................................................ 63
Appendices.................................................................................................................................... 64
A. References................................................................................................................................ 64
B. Acknowledgements .................................................................................................................. 66
WS-BPEL 2.0 Primer 9 May 2007
Copyright © OASIS Open 2007. All Rights Reserved. Page 5 of 66