Docstoc

BPEL - Florida Atlantic University

Document Sample
BPEL - Florida Atlantic University Powered By Docstoc
					                 Florida Atlantic University

      Department of Computer and Electrical Engineering
               &Computer Science ( CEECS )

              Directed Independent Study (DIS)

                          Fall 2009




Business Process Execution Language
              (BPEL)


                          Ola Ajaj
                       oajaj@fau.edu
    OUTLINE



• Motivation
•   Main Concepts
•   Examples
•   Status and support




                         2
                 MOTIVATION
 Web services  move towards service-oriented computing
   Applications are viewed as “services”
   Loosely coupled, dynamic interactions
   Heterogeneous platforms
   No single party has complete control

 Application integration is a key problem facing businesses
    Intra enterprise integration (Enterprise Application
     Integration)
    Integrating with partners (Business Process Integration)

 Service composition
    How do you compose services in this domain?



                                                                3
APPLICATION INTEGRATION
 .net                          WAS (IBM WebSphere Application Server )




                Business Process
 SOAP




                                                        Legacy integration




        USERS

                                       CICS (Customer Information Control System)
                                       is a transaction server that runs online processing



                                                                                             4
      TWO-LEVEL PROGRAMMING MODEL

 BPEL's development came out of the notion that programming in the
  large and programming in the small required different types of
  languages.



  Programming in the large                Programming in the small
      Non-programmers implementing           Programmers implementing
      flows.                                  functions.

      Flow logic deals with combining        Function logic deals with a discrete
      functions in order to solve a more      fine-grained task
      complex problem
                                              (such as retrieving an order
      (such as processing an order).         document or updating a customer
                                              record).




                                                                                 5
             DEFINITION
• A business process is a collection of related,
  structured activities or tasks that produce a
  specific service or product.


                      BPEL
• is an executable language for specifying
  interactions with web Services.

• Processes in “BPEL” export and import
  information by using web Service interfaces
  exclusively.


                                                   6
                          WS-BPEL
 Web services Interoperability.



 Flexible Integration
    Rich, and easily adaptable to changes in the services it is
     interacting with.
    Third-party composition of existing services.
    Increased scalability and reuse.


 Recoverability
    Business processes (particularly long running ones) need a way
     to build-in fault handling and compensation mechanisms to
     handle and recover from errors.




                                                                   7
                          WS-BPEL
• WS-BPEL helps…
  – Defining business processes as coordinated sets of Web service
    interactions that will led to a new aggregated Web services.
  – Creating compositions of Web services based on abstract
    descriptions.

   Abstract process
      •(programming in the large)  high level state transition.
      •For e-commerce specifications.
      •E.g. when to wait for messages, when to send messages, when to compensate for
      failed transactions.

   executable process
      •(programming in the small)  short-lived programmatic behavior.
      •For integrating enterprise applications.
      •E.g. access to local logic and resources such as files, databases.




                                                                                  8
                     WS-BPEL
 WS-BPEL comes from …

   – Strong roots in traditional flow models.

   – Plus many concepts from structured programming
     languages.

   – All laid on top of WSDL and core XML specifications

   – Merges WSFL and XLANG concepts.




                                                           9
         WS-BPEL SPECIFICATIONS

• BPEL4WS 1.0 (7/2002)
   – Original proposal from BEA, IBM, Microsoft.
   – Combined ideas from IBM’s WSFL and Microsoft’s XLANG


• BPEL4WS 1.1 (5/2003)
   – Revised proposal submitted to OASIS.
   – With additional contributions from SAP and Siebel.


• WS-BPEL 2.0 (4/2007)
   – This change in name was done to align BPEL with other Web
     Service standard naming conventions which start with WS- and
     accounts for the significant enhancements between BPEL4WS 1.1
     and WS-BPEL 2.0.



                                                               10
BPEL & Web Service Standards
BPEL & Web Service Standards




                               12
     OUTLINE


•   Motivation

• Main Concepts
•   Examples
•   Status and support




                         13
          LANGUAGE STRUCTURE


 Process

 Partner links

 Data handling

 Properties and correlation

 Basic and structured activities




                                    14
                              BASIC ACTIVITIES

        •
     receive
               Do a blocking wait for a                throw
                                                                Generate a fault from inside the business
               matching message to arrive                       process

        •
       reply
               Send a message in reply to a          rethrow
                                                                Forward a fault from inside a fault
               formerly received message                        handler

       •
     invoke    Invoke a one-way or request-              exit   Immediately terminate execution of a
               response operation                               business process instance

        •
      assign
               Update the values of variables or        wait    Wait for a given time period or until a
               partner links with new data                      certain time has passed

        •      Validate XML data stored in                      Invoke compensation on an inner scope

                                                   compensate
    validate
               variables                                        that has already completed

        •      A “no-op” instruction for a
     empty
               business process




                                                                                                      15
                                                 BPEL & WSDL

• BPEL processes are exposed as WSDL services
   – Message exchanges map to WSDL operations.
   – WSDL can be derived from partner definitions and the role played
     by the process in interactions with partners.



                               WSDL
                            Loan Approval
                                                        Loan Approval Process
                              PortType
                                                              receive
  The <portType> element, which has been renamed to
  <interface> in WSDL 2.0, defines a web service, the
  operations that can be performed, and the messages
  that are used to perform the operation.




                                                             reply
                                                                                   Web
                                                                                Service


                                                                                          16
               RECURSIVE COMPOSITION

• BPEL processes interact with WSDL services exposed by
  business partners.

  Interfaces exposed                      Interfaces consumed
  by the BPEL process                     by the BPEL process



                        Loan Approval Process

                          receive                               Financial Institution‘s
                                                                    Web Service
                                                                  (Loan Approver)
                                 invoke




                         reply
                                             Web                                     Web
                                          Service                                 Service


                                                                                          17
  COMPOSITION OF WEB SERVICES


 Service A              Service P                                             Service B

                                           receive



                                                              invoke
                        receive



                                                     invoke



                                  invoke




A’s WSDL     P’s WSDL                                             P’s WSDL   B’s WSDL


  Partner Link                                                Partner Link
  Type                                                        Type

                                                                                          18
                       PARTNER LINKS


• Partner link: instance of typed connector
   – Partner link type specifies required and/or provided
     portTypes.
   – Channel along which a peer-to-peer conversation with a
     partner takes place.




     Process 1                                                Process 2

                               Partner
                 Port Type 1               Port Type 2
                               Link Type




                                                                  19
   BPEL DATA MODEL : VARIABLES

 Scoped variables typed as
                                                        Activities’ input and output
    WSDL messages or
                                                         kept in scoped variables
XML Schema elements/types

                                         receive




                                   ...
                                                            invoke
      42
                                                                     Assignment activities
                                                                      move data around
                                                   assign
                             ...
                                                                                      0


                                         reply                                        1




                                                                                          20
         PROPERTIES AND CORRELATION


• Messages in long-running conversations are correlated to the
  correct process instance.

• Typed properties defined in WSDL are named and mapped
  to parts of several WSDL messages used by the process.

                                                    Process 4
                                                         Process 3
                                                                Process 2
                                customerId                           Process 1

                                orderNumber


  WSDL message   0815   42




                                                                        21
               STRUCTURED ACTIVITIES

   ** prescribes the order in which a collection of activities is executed


               Contained activities are                    Block and wait for a suitable message
      flow     executed in parallel                 pick   to arrive (or time out)



                                                           Contained activity is performed
               Select exactly one branch of     forEach    sequentially or in parallel
if then else
               activity from a set of choices



               Contained activity is repeated              Contained activities are performed
                                                sequence
               while a predicate holds                     sequentially
     while

               Contained activity is repeated
               until a predicate holds                     Associate contained activity with its
                                                   scope
                                                           own local variables, fault handlers,
repeatUntil                                                compensation handler, and event
                                                           handlers



                                                                                             22
    NESTING STRUCTURED ACTIVITIES

<sequence>                                         sequence

   <receive .../>
                                    receive
   <flow>
                                                     flow
      <sequence>
          <invoke .../>
                                       sequence               sequence
          <while ... >
             <assign>...</assign>
                                          invoke                receive
          </while>
      </sequence>
      <sequence>                         while                  invoke

          <receive .../>
          <invoke ... >                  assign
      </sequence>
   </flow>
   <reply>
                                     reply
</sequence>



                                                                          23
     PROCESS INSTANCE LIFECYCLE


• Business processes defined in BPEL represent stateful
  Web services
   – When a process is started, a new instance is created.
   – The creation and destruction of BPEL process instances is by
     design implicit.




    receive       invoke        invoke        invoke        reply




                                                                    24
    OUTLINE


•   Motivation
•   OASIS and WS-BPEL
•   Main Concepts

• Examples
•   Status and support




                         25
           GRAPH-ORIENTED AUTHORING STYLE


       Risk_Assessment
                                                flow                             Loan_Approval
          PortType                                                                 PortType

                         amount < 10000                    amount >= 10000
                                              receive

                                          risk = "high"
                                 invoke                       invoke
  loan                                                                                      loan
assessor                                                                                  approver
                                               assign
                         risk = "low"                     approved = "true"



                                                            approved = "false"
                                               reply




1. A customer asks for a loan, providing name and amount info.
2. Two services are involved:
   a) A risk assessor which can approve the loan if the risk is low.
   b) A loan approver which checks the name and approves/disapproves the loan.
3. The reply is returned to the customer.



                                                                                                 26
STRUCTURED AUTHORING STYLE

                           sequence



    flow           if-then-else         reply      reply
                                      (seller)   (buyer)
                     if
   receive   buyer$$ < seller$$
  (buyer)          Then

                       assign
                    "failure"

                    else

  receive              assign
  (seller)          "success"




                                                           27
FAULT-HANDLING & COMPENSATION

                                              Process



                                       flow                                       fault
                                                                                handler


                                                                              notify
                scope                                   scope               manager

                        compensation                                fault
                             handler                              handler
                                                                            compensate
      charge              refund                 ship
                                                                rethrow
  credit card           customer                goods




                                                                                 28
                               example
As an example, imagine planning a holiday or business trip.

First it will first be necessary to request flight ticket offers from different
airlines, and then do the same with hotels at the travel destination. Once the
offers arrive, it will be necessary to compare them and choose the best one for
you.

Having decided on the airline and the hotel, you'll make the reservations.
If anything goes wrong, e.g. because you have to change your plans shortly
before your departure, it might be necessary to cancel the bookings.

Using Web Service technologies, all those simple steps might be offered as Web
Services. In addition to a web site, airlines will offer Web Services to obtain offers
and to book flights. The same goes for hotels to book rooms etc.

BPEL makes it possible to orchestrate those Web Services into a new "Travel-
Service" composed of all the other services.

This allows for a creation of new virtual services, based on existing services, e.g.
                                a "virtual travel agency".




                                                                                         29
       ABSTRACT & EXECUTABLE PROCESS VIEW

Abstract Process …

           Traveler Process              Agent Process   Airline Process




                                                   get             get
                                             itinerary           order



                 submit
                to agent



                                                order
                                               tickets


      receive                 receive          receive        confirm
confirmation                   tickets   confirmation           flight



                                                send              send
                                         confirmation           tickets




                                                                           30
       ABSTRACT & EXECUTABLE PROCESS VIEW


Executable Process …

           Traveler Process              Agent Process   Airline Process




                    plan                           get             get
                    trip                     itinerary           order



                 submit                         select         reserve
                to agent                       airline           seats



                                                order          charge
                                               tickets     credit card


      receive                 receive          receive        confirm
confirmation                   tickets   confirmation           flight



                                                send              send
                                         confirmation           tickets




                                                                           31
    OUTLINE


•   Motivation
•   Main Concepts
•   Examples

• Status and support




                    32
                 WS-BPEL LIABILITIES


• BPEL language specifies the behavior of business processes as long
  as the activities of the processes are Web services.

   Human interactions are not in its domain. Despite wide acceptance
   of Web services in distributed business applications, the absence
   of human interactions is a significant gap for many real-world
   business processes.

• To fill this gap, BPEL4People extends BPEL from orchestration of
  Web services alone to orchestration of role-based human activities
  as well.
    –   Orchestration: automated arrangement and management of complex systems,
        middleware, and services.




                                                                                  33
                       BPEL & WS -*




• Part 2 will cover how to implement Security Considerations
  into BPEL.

• How to relate specifications built on top of the WS-Security,
  such as WS-Trust, WS-Privacy, WS-Federation to WS-BPEL.




                                                            34
                                References
   WS-BPEL 2.0 – latest approved committee draft (September 2005)
     http://www.oasis-open.org/committees/document.php?document_id=14314&wg_abbrev=wsbpel


   BPEL4WS 1.1
     o   http://dev2dev.bea.com/technologies/webservices/BPEL4WS.jsp
     o   http://www-128.ibm.com/developerworks/library/specification/ws-bpel/
     o   http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbiz2k2/html/bpel1-1.asp
     o   http://ifr.sap.com/bpel4ws/
     o   http://www.siebel.com/bpel


   Human user interactions – BPEL4People (as known from existing workflow engines)
     http://www-128.ibm.com/developerworks/webservices/library/specification/ws-bpel4people/


   Subprocesses – based on a coordination protocol
     http://www-128.ibm.com/developerworks/webservices/library/specification/ws-bpelsubproc/

   Wikipedia
     http://en.wikipedia.org/wiki/BPEL

   BPEL Resource Guide
     http://bpelsource.com




                                                                                                      35

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:2/6/2013
language:English
pages:35