You are previewing WS-BPEL 2.0 Beginner's Guide.
O'Reilly logo
WS-BPEL 2.0 Beginner's Guide

Book Description

Design and develop WS-BPEL executable business processes using Oracle SOA Suite 12c

In Detail

Business Process Execution Language (BPEL, also known as WS-BPEL) has become the de facto standard for orchestrating services in SOA composite applications. It enables the automation of business processes, reduces the gap between business requirements and applications, and allows better alignment between business processes and the underlying IT architecture. BPEL is an open specification and one of the most important pieces of SOA.

This book provides a fast-paced practical introduction to WS-BPEL, one of the centerpieces of SOA. It covers the most important features of BPEL 2.0 and provides several real-world examples to underline its concepts.

What You Will Learn

  • Design and develop BPEL 2.0 executable business processes
  • Become familiar with BPEL 2.0 activities and the most important usage scenarios
  • Learn how to invoke and orchestrate services, manipulate data and use variables
  • Implement conditions and loops, and recognize fault-handling capabilities to avoid unexpected states
  • Understand message exchange patterns and learn about asynchronous communication channels and dynamic parallel invocations
  • Learn about human interactions, human tasks, events and event handling, and compensations
  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. WS-BPEL 2.0 Beginner's Guide
      1. Table of Contents
      2. WS-BPEL 2.0 Beginner's Guide
      3. Credits
      4. About the Authors
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
          3. Instant updates on new Packt books
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Time for action – heading
          1. What just happened?
          2. Pop quiz – heading
          3. Have a go hero – heading
        6. Reader feedback
        7. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Hello BPEL
        1. Introduction to BPEL
        2. Installing Oracle JDeveloper and SOA Suite
          1. Installing the JDK and setting environment
        3. Time for action – installing the JDK and setting environment
          1. What just happened?
          2. Installing SOA Suite with JDeveloper
        4. Time for action – installing JDeveloper and SOA Suite
          1. What just happened?
          2. Creating a default domain
        5. Time for action – creating a default domain
          1. What just happened?
        6. Developing our first BPEL process
        7. Time for action – creating the SOA composite application
          1. What just happened?
        8. Time for action – creating XML Schema for the BPEL process
          1. What just happened?
        9. Time for action – modifying WSDL
          1. What just happened?
        10. Time for action – implementing the BPEL process
          1. What just happened?
        11. Deploying the first BPEL process
        12. Time for action – deploying the BPEL process
          1. What just happened?
        13. Testing our first BPEL process
        14. Time for action – testing the BPEL process
          1. What just happened?
        15. Understanding the BPEL language
        16. The BPEL structure
          1. Partner links
          2. Variables
          3. The process logic
          4. A detailed look at the BPEL activities
            1. <process>
            2. <receive> and <reply>
              1. <receive>
              2. <reply>
        17. Bookstore BPEL process with branches
        18. Time for action – more sophisticated BPEL process
          1. What just happened?
          2. Deploy and test the second BPEL process
        19. Time for action – deploying and testing the second BPEL process
          1. What just happened?
          2. Have a go hero – test the process
          3. Pop Quiz – BPEL basics
        20. Summary
      9. 2. Service Invocation
        1. Service invocation and orchestration
        2. Developing the book warehousing process
        3. Time for action – creating the book warehousing process
          1. What just happened?

          2. Implementing the book warehousing BPEL
        4. Time for action – developing the book warehousing process
          1. What just happened?
          2. Deploying and testing the book warehousing BPEL process
        5. Understanding sequential invocation
          1. A closer look at <invoke>
        6. Understanding partner links
          1. Partner link types
          2. Defining partner links
        7. Parallel service invocation
        8. Time for action – developing parallel flows
          1. What just happened?
          2. Deploying and testing the parallel invocation
        9. Understanding a parallel flow
          1. Pop quiz – service invocation
        10. Summary
      10. 3. Variables, Data Manipulation, and Expressions
        1. Variables in BPEL
          1. Declaring variables
          2. Variable types
        2. Variables in BookWarehousingBPEL
        3. Time for action – review of existing variables
          1. What just happened?
          2. Declaring XML type variables
        4. Time for action – creating XML type variables
          1. Have a go hero – create the LowestQuantity variable
          2. What just happened?
          3. Declaring XML element variables
        5. Time for action – creating XML element variables
          1. What just happened?
          2. Declaring a WSDL message type variable
        6. Time for action – creating a message type variable
          1. What just happened?
        7. Data manipulation and assignments
        8. Time for action – copying variables
          1. What just happened?
        9. Expressions
          1. Copying variable parts
        10. Time for action – copying variable parts
          1. What just happened?
          2. Other options for copying data
          3. Optional attributes
        11. Manipulating data for external partner links
        12. Time for action – creating the AnotherBookstoreBPEL process
          1. Have a go hero – implementing the AnotherBookstoreBPEL process
          2. What just happened?
        13. Time for action – extending the BookWarehousing process
          1. What just happened?
          2. Have a go hero – implementing the rest of the BookWarehousing process
        14. Validating variables
        15. Time for action – validating variables
          1. What just happened?
        16. The XSLT transformations
        17. Time for action – using XSLT transformations
          1. What just happened?
          2. Have a go hero – deploy and test the process
          3. Pop quiz: variables and data manipulation
        18. Summary
      11. 4. Conditions and Loops
        1. Conditions
        2. Time for action – selecting the bookstore with the lowest quantity
          1. What just happened?
          2. VintageBookstore
        3. Time for action – implementing VintageBookstore
          1. Have a go hero – implementing VintageBookstoreBPEL process
          2. What just happened?
        4. Time for action – selecting VintageBookstore
          1. What just happened?
          2. Have a go hero – implementing vintage branch
        5. Loops
          1. While
          2. Repeat until
          3. For each
            1. Parallel for each
          4. Arrays
        6. Adding loops to our example
        7. Time for action – adding the BookOrderManagement process
          1. What just happened?
          2. The while loop
        8. Time for action – adding the <while> loop
          1. What just happened?
          2. Have a go hero – testing the process
          3. The repeat until loop
          4. Have a go hero – using <repeatUntil> instead of <while>
          5. The forEach loop
        9. Time for action – the <forEach> loop
          1. What just happened?
          2. Have a go hero – test the process
        10. Executing <forEach> in parallel
        11. Time for action – executing <forEach> in parallel
          1. What just happened?
        12. Delays
          1. Deadline and duration expressions
          2. Adding delay to our book order management process
        13. Time for action – adding <wait>
          1. What just happened?
          2. Have a go hero – test the process
        14. Ending a process
        15. Empty activities
          1. Pop quiz – conditions and loops
        16. Summary
      12. 5. Interaction Patterns in BPEL
        1. Understanding asynchronous invocations
          1. The book warehousing process
        2. Time for action – implementing an asynchronous invocation
          1. Creating an empty WS BPEL 2.0 process
          2. Defining the partner link with myRole and partnerRole
          3. Defining the invoke activity
          4. Defining the receive activity
          5. What just happened?
        3. Understanding asynchronous service invocations
          1. Callbacks
            1. Setting up a callback
            2. Mapping response messages from asynchronous invocations
          2. Message correlation – why, when, and how is it essential?
            1. Setting up a correlation set
              1. Understanding the correlation set
              2. WSDL message property
              3. Property alias
            2. Using a correlation for an asynchronous web service invocation
              1. Initializing a correlation at <invoke>
              2. Referring the initialized correlation at <receive>
        4. Time for action – creating an asynchronous BPEL process
          1. What just happened?
            1. Using the <invoke> activity instead of <reply>
          2. Have a go hero – an asynchronous BPEL process with asynchronous service invocations
          3. Pop quiz
        5. Summary
      13. 6. Fault Handling and Signaling
        1. Introducing faults and fault handlers
          1. Communication issues
          2. Contract issues
          3. Faults thrown from the external web service
          4. Faults thrown from the business process
          5. Introducing fault handlers
          6. Preparing for action
        2. Time for action – adding fault handlers
          1. What just happened?
        3. Modeling execution errors with WS-BPEL 2.0 standard faults
        4. Modeling logical (explicit) errors with the <throw> activity
        5. Modeling errors propagated from external web services
        6. Understanding fault handlers and signaling
          1. Structure of a fault handler
          2. Location of a fault handler
            1. The global fault handler
            2. The local (inline) fault handler
          3. Configuring a fault handler
          4. BPEL runtime fault handler selection
            1. Selecting a fault handler when the fault is not associated with data
            2. Selecting a fault handler when the fault is associated with data
        7. WSDL faults
          1. WSDL fault specification
        8. Handling faults
          1. Defining fault handling logic within <catch> and <catchAll>
          2. Propagating faults to parent scopes
        9. In-line fault handling
          1. Within a <scope> activity
          2. Within an <invoke> activity
        10. Time for action – signaling faults
          1. What just happened?
            1. Signaling faults within the BPEL process
            2. Signaling faults to the synchronous clients
            3. Signaling faults from the asynchronous process
            4. Ending and terminating a BPEL process
          2. Have a go hero – adding fault handlers to BPEL process
          3. Pop quiz
        11. Summary
      14. 7. Working with Scopes
        1. Introducing scopes
        2. Time for action – adding scopes
          1. What just happened?
            1. How to organize scopes
              1. Using <scope> in place of <process>
              2. Using <scope> in place of <sequence> or <flow>
              3. What to consider when defining a scope
                1. Encapsulating a logical unit of work
              4. A unit of work that needs customized compensation or termination
            2. Fault and termination handling within scopes
        3. Time for action – the fault and termination handlers
          1. What just happened?
            1. Handlers
              1. A fault handler
              2. An event handler
              3. A compensation handler
              4. A termination handler
            2. Isolated scopes
          2. Have a go hero – restructuring a BPEL process into scopes
          3. Pop quiz
        4. Summary
      15. 8. Dynamic Parallel Invocations
        1. Introducing dynamic parallel invocations
          1. Creating the <forEach> activity
        2. Time for action – adding a <forEach> activity
          1. What just happened?
        3. Time for action – configuring the <invoke> activity within a <forEach> activity
          1. What just happened?
          2. Initializing the input variable
        4. Time for action – initializing the input variable within a <forEach> activity
          1. What just happened?
        5. Initializing a dynamic partner link
        6. Time for action – initializing a dynamic partner link
          1. What just happened?
          2. Constructing the response variable of the BPEL process
        7. Time for action – appending multiple values to a variable
          1. What just happened?
            1. Understanding the <forEach> loop
              1. Required elements and attributes of a <forEach> activity
              2. Declaring the invocation logic of a <forEach> activity
              3. Configuring a parallel <forEach> activity
              4. Declaring a customized completion condition in a <forEach> activity
            2. Understanding the parallel <forEach>
              1. What happens when starting the <forEach> activity
              2. What happens when the completion condition is met
            3. Understanding the difference between <flow> and parallel <forEach>
              1. Lack of synchronization dependencies
              2. Repeating the same activity rather than different activities
          2. Pop quiz
        8. Summary
      16. 9. Human Tasks
        1. Understanding human tasks
        2. Preparing an asynchronous example
          1. Have a go hero – converting BookWarehousingBPEL to an asynchronous process
        3. Adding a human task to the BookWarehousingBPEL process
          1. Creating a human task definition
        4. Time for action – creating a human task definition
          1. What just happened?
          2. Configuring human tasks
        5. Time for action – configuring the human task title
          1. What just happened?
        6. Time for action – specifying a human task payload
          1. What just happened?
        7. Time for action – assigning a human task
          1. What just happened?
        8. Time for action – configuring human task deadlines
          1. What just happened?
        9. Time for action – configuring human task notifications
          1. What just happened?
          2. Invoking a human task from the BPEL process
        10. Time for action – invoking a human task from the BPEL process
          1. What just happened?
          2. Configuring human task case branches
        11. Time for action – configuring human task case branches
          1. What just happened?
          2. Creating human task forms
        12. Time for action – creating human task forms
          1. What just happened?
        13. Deploying and testing human tasks
        14. Time for action – deploying the human task
        15. Time for action – testing the human task
          1. Worklist application
          2. Completing the task
          3. Pop quiz – human tasks
        16. Summary
      17. 10. Events and Event Handlers
        1. Understanding events
          1. Types of events
            1. Business events
            2. Message events
            3. Alarm events
        2. Developing an event-driven BPEL process
          1. Declaring a business event
        3. Time for action – declaring a business event
          1. What just happened?
          2. Developing a book shelving BPEL process
        4. Time for action – developing an event-driven book shelving BPEL process
          1. What just happened?
          2. Have a go hero – implementing the BookShelvingBPEL process
        5. Triggering a business event from a BPEL process
        6. Time for action – triggering BookshelfEvent from the book warehousing BPEL process
          1. What just happened?
        7. Adding an event handler to the Book Warehousing BPEL process
          1. Adding an alarm event handler
        8. Time for action – adding an event handler to the BPEL process
          1. What just happened?
          2. Specifying alarm event activities
        9. Time for action – adding onEvent to the callback interface
          1. What just happened?
        10. Time for action – specifying alarm event handler activities
          1. What just happened?
          2. Adding a message event handler
        11. Time for action – adding a message handler to the BPEL process
          1. What just happened?
          2. Declaring a cancel operation on the BPEL interface
        12. Time for action – declaring the cancel operation on the BPEL process interface
          1. What just happened?
          2. Specifying message event activities
        13. Time for action – specifying message event activities
          1. What just happened?
          2. Deploying and testing event handlers
        14. Asynchronous invocations and events
          1. Implementing the WarehousingConfirmation service
          2. Have a go hero – implementing WarehousingConfirmation
          3. Invoking the WarehousingConfirmation service
        15. Time for action – invoking the WarehousingConfirmation service
          1. What just happened?
          2. Waiting for callback
        16. Time for action – waiting for callback
          1. What just happened?
          2. Waiting for onFault and onEvent callbacks
        17. Time for action – waiting for onFault and onEvent callbacks
          1. What just happened?
          2. Adding an alarm event for callback
        18. Time for action – adding an alarm event for callback
          1. What just happened?
          2. Have a go hero – deploying and testing the example
          3. Pop quiz: events and event handlers
        19. Summary
      18. 11. Compensations
        1. Introducing compensation in business processes
          1. Defining the compensation logic for a <scope> activity with <compensationHandler>
        2. Time for action – adding compensation handlers
          1. What just happened?
          2. Understanding the long-running processes
          3. Understanding the concept of compensation
          4. The difference between fault handling and compensation
        3. Time for action – triggering a fault within the BPEL process
          1. What just happened?
          2. Initiating a compensation for scopes within a BPEL process
        4. Time for action – triggering compensation for the BPEL process
          1. What just happened?
          2. Implementing compensation handlers
            1. Triggering compensation handlers
            2. The execution of multiple compensation handlers
            3. The default compensation handler
          3. Have a go hero – compensating specific scopes
          4. Pop quiz
        5. Summary
      19. A. Pop Quiz Answers
        1. Chapter 1, Hello BPEL
          1. Pop quiz – BPEL basics
        2. Chapter 2, Service Invocation
          1. Pop quiz – service invocation
        3. Chapter 3, Variables, Data Manipulation, and Expressions
          1. Pop quiz – variables and data manipulation
        4. Chapter 4, Conditions and Loops
          1. Pop quiz – conditions and loops
        5. Chapter 5, Interaction Patterns in BPEL
          1. Pop quiz – labels
        6. Chapter 6, Fault Handling and Signaling
          1. Pop quiz
        7. Chapter 7, Working with Scopes
          1. Pop quiz – playing audio
        8. Chapter 8, Dynamic Parallel Invocations
          1. Pop quiz
        9. Chapter 9, Human Tasks
          1. Pop quiz – human tasks
        10. Chapter 10, Events and Event Handlers
          1. Pop quiz – events and event handlers
        11. Chapter 11, Compensations
          1. Pop quiz
      20. Index