Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

Business Process Execution Language (BPEL) by qws18475

VIEWS: 164 PAGES: 46

									              Rich Powers
CSC 9010 – Service Oriented Architecture
              Spring 2008
   Business Process 101
   Business Processes Automation & Web Service
    Standards
   WS-BPEL Overview
   Intalio BPMS BPEL Platform
   Future Directions for WS-BPEL Adoption
   What is the concept of Business Process
    Automation and workflow technologies?
   What are the technologies and standards that
    constitute the SOA approach for Business
    Process Automation?
   What are the prospects for adoption of BPEL
    and the future direction of standards-based
    Business Process Automation leveraging web
    services?
   Business Process 101
   Business Processes Automation & Web Service
    Standards
   WS-BPEL Overview
   Intalio BPMS BPEL Platform
   Future Directions for WS-BPEL Adoption
   A business process is a collection of interrelated tasks,
    which are designed to deliver a particular result
   Types of business processes
     Management processes - processes that govern the operation of a
      system
     Operational processes - processes that constitute the core activities
      of the business and delivers the primary value of the organization
     Supporting processes - which support the core processes
   A business process can be decomposed into several sub-
    processes, which have their own attributes, but are aligned
    with the goal of the overall process
   The analysis of business processes typically includes the
    mapping of processes and sub-processes down to an activity
    level
   Business processes can be automated through BPM software
    and workflow
IT becomes the enabler of business
agility through the systemization of
flexible processes

However…

Business processes, by nature, are a
challenge to identify, document,
implement, and change
   Key Questions for Workflow Design
       Who Should?
         Who is involved in the process
       Do What?
         What tasks/activities need to be performed
       To What?
         What entities (objects) and data involved
       When?
         What starts and stops the process
       In What Order?
         What is the sequence and interrelationship between tasks
       Why?
         What is the value proposition of using workflow
   Improve the speed of a business process
   Improve the consistency of a business process
   Improve the quality of a business process




    The key challenge in workflow automation is to
    determine the ROI and business value to be
    achieved through the introduction of technology
   Basic Control Flow                                  Cancellation and Force Completion
       Sequence                                         Patterns
       Parallel Split                                      Cancel Task
       Synchronization                                     Cancel Case
       Exclusive Choice                                Interation Patterns
   Advanced Branching and                                  Arbitrary Cycles
    Synchronization                                         Structured Loop
       Multi-Choice                                        Recursion
       Structured Synchronizing Merge                  Termination Patterns
       Multi-Merge                                         Implicit Termination
       Structured Discriminator                            Explicit Termination
       Blocking Discriminator                          Trigger Patterns
   Multiple Instance Patterns                              Transient Trigger
                                                            Persistent Trigger
       Multiple Instances without Synchronization
       Multiple Instances with a Priori Design-
        Time Knowledge
       Multiple Instances with a Priori Run-Time
        Knowledge
   State-Based Patterns
       Deferred Choice
       Interleaved Parallel Routing
       Milestone
   Business Process 101
   Business Processes Automation & Web Service
    Standards
   WS-BPEL Overview
   Intalio BPMS BPEL Platform
   Future Directions for WS-BPEL Adoption
Discovery, Negotiation, Agreement




                                                                    Component
                                    Orchestration   Protocols                         State
                                                                    Model                          Components

                                    Composite                                       Atomic


                                    Reliable                                                           Quality
                                                                Security            Transactions
                                    Messaging                                                        of Service



                                    Interface + Bindings                   Policy                   Description


                                    XML                                    Non-XML                  Messaging


                                    Transport                                                        Transport
Discovery, Negotiation, Agreement




                                     WS-BPEL          WS-C          Component
                                                                     SCA             WS-RF
 UDDI, WS-Addr, Metadata Exch.,…




                                    Orchestration   Protocols                       State
                                                      WS-N*         Model                        Components

                                    Composite                                     Atomic


                                    Reliable                                          WS-AT          Quality
                                    WS-RM                       Security
                                                                WS-Security*      Transactions
                                    Messaging                                         WS-BA        of Service



                                    Interface + Bindings
                                     WSDL*                                Policy
                                                                              WS-Policy*          Description


                                    XML WS-Addr*
                                     SOAP,                                Non-XMLRMI/IIOP, ...
                                                                             JMS,                 Messaging


                                    Transport
                                           HTTP, TCP/IP, SMTP, FTP, …                              Transport
Discovery, Negotiation, Agreement




                                     WS-BPEL          WS-C          Component
                                                                     SCA             WS-RF
 UDDI, WS-Addr, Metadata Exch.,…




                                    Orchestration   Protocols                       State
                                                      WS-N*         Model                        Components

                                    Composite                                     Atomic


                                    Reliable                                          WS-AT          Quality
                                    WS-RM                       Security
                                                                WS-Security*      Transactions
                                    Messaging                                         WS-BA        of Service



                                    Interface + Bindings
                                     WSDL*                                Policy
                                                                              WS-Policy*          Description


                                    XML WS-Addr*
                                     SOAP,                                Non-XMLRMI/IIOP, ...
                                                                             JMS,                 Messaging


                                    Transport
                                           HTTP, TCP/IP, SMTP, FTP, …                              Transport
   Business Process 101
   Business Processes Automation & Web Service
    Standards
   WS-BPEL Overview
   Intalio BPMS BPEL Platform
   Future Directions for WS-BPEL Adoption
   Web Services Business Process Execution Language (WS-
    BPEL) is a language for describing business processes based
    on Web Services
     Processes described using WS-BPEL execute functionality by
      using Web Service interfaces exclusively
     WS-BPEL Specification is administered by OASIS
   WS-BPEL is an orchestration language, not a choreography
    language
     Orchestration specifies an executable process that involves
      message exchanges with other systems, such that that the message
      exchange sequences are controlled by the orchestration designer.
     Choreography specifies a protocol for peer-to-peer interactions,
      defining the legal sequences of messages exchanged with the
      objective of guaranteeing interoperability
     A choreography is not directly executable
     A choreography can be implemented through an orchestration (i.e.
      a BPEL process)
   Dec 2000
       Microsoft publishes XLANG
   March 2001
       IBM publishes WSFL
   July 2002
       IBM, Microsoft, BEA converge WSFL and XLANG into
        BPEL4WS 1.0
   March 2003
       BPEL4WS is submitted to OASIS
   May 2003
       OASIS publishes BPEL4WS 1.1
   April 2007
       WS-BPEL 2.0 standard
   Business processes defined using an XML-based language

   Web services are the model for process decomposition and assembly

   The same orchestration concepts are used for both the external (abstract) and
    internal (executable) views of a business process

   Both hierarchical and graph-like control regimes are used, reducing the
    fragmentation of the process modeling space

   An identification mechanism for process instances is provided at the application
    message level

   The basic lifecycle mechanism is in implicit creation and termination of process
    instances.

   A long-running transaction model is defined to support failure recovery for parts of
    long-running business processes

   Language built on compatible Web services standards in a composable and
    modular manner
   WS-BPEL process definition
   Recursive composition and partner links
   Variables
   Correlation sets
   Basic and structured activities
   Scopes
   Compensation handling
                                                       process
Declare dependencies on                                           Declare namespaces of
external XML Schema or                                               WS-BPEL extension
WSDL definitions              imports    extensions              attributes and elements

Relationships that a WS-                                           Relationship between
BPEL process will             partner      message               inbound and outbound
employ in its behavior          links    exchanges                    message activities

Data holding state of a                                          Application data fields
                                         correlation
business process or          variables                           that together identify a
                                                sets
exchanged with partners                                                    conversation

Concurrently process
                                event         fault               Deal with exceptional
inbound messages or
                             handlers      handlers               situations in a process
timer alarms



Perform the process logic                   primary               WSDL
– any number of activities                   activity             definitions
may be recursively nested                                                    XML
                                                                             schemas
 WS-BPEL processes are                         WS-BPEL processes interact
  exposed as Web services                      with Web services exposed
 to business partners                          by business partners




WSDL
Loan                        Loan Approval Process
Approval
PortType                       receive


                                                                     Financial institution„s
                                      invoke                         Web service
                                                                     implementation
                                                                     (Loan Approver)
                              reply




                Web                                                                              Web
                Service                                                                        Service
  WDSL describes functionality of services provided by a
   partner
 Partner Link describes the shape of the relationship with a
   partner by describing the Port Types used in a peer to peer
   relationship
 Example:
                                          Reference to WDSL
                                           portType element
<partnerLinks>
   <partnerLink name=“Invoice”
      partnerLinkType=“inv:InvoiceType”
      partnerRole=“InvoiceServiceProvider”/>
    <partnerLink name=“Employee”
      partnerLinkType=“emp:EmployeeType”
      partnerRole=“EmployeeServiceProvider”/>
</partnerLinks>
                                                                                   process

                                Peer-to-peer conversational partner relationship

                                                           partner
                                                              link

                                      receive                                  invoke
Inbound request – service                                                                        Outbound request – service
provided by the process                                                                             required by the process




                            myRole                                                 partnerRole
        WSDL                                                                                            WSDL
                                                    partner link type
        port type                                                                                       port type


     Provided port type                                                                             Required port type
   Variable construct is used to state information
    related to workflow logic
   Variables can contain entire messages and data
    sets formatted as XSD schema types
   Example:                             Message Name from
                                             Partner Process
<variables>                                    Definition
   <variable name=“EmployeeHoursRequest”
   messageType=“emp:getWeeklyHoursRequestMessage”/>
</variables>
                                                                    process
                      Variables defined using WSDL messages
request                                                                                     request




                           receive                               invoke
response

                 42
                                                 xsl:transform                             response

                             reply                                assign




          WSDL                 42                                             XML Schema
           WSDL                                                                XML
            WSDL
          messages                                                            elements / types
           message                                                             schemas
            message   Variables defined using XML schema elements or types
           How to identify stateful instances via stateless WS interfaces?
           A process instance is assigned one or more keys
             Business data is used as key, e.g., customerID
             A key can be compound, e.g., (customerID, orderNumber)
             WS-BPEL calls a key a correlation set – it is used to correlate an incoming
              message with a process instance

                                                                      Process 4
                                                                      (0123,15)
                                           customerID
                                                                             Process 3
                                           orderNumber                       (0815,42)
                                                                                    Process 2
Message 1                                                                           (4711,37)
                                                                                           Process 1
                    4711        37                                                         (0815,12)

Message 2
                    0815        42
                                                                  process

Do a blocking wait for a                                                       Immediately terminate
matching message to arrive     receive    reply                exit            execution of a business
/ send a message in reply                                                            process instance
                                                                              Invoke compensation on
Invoke a one-way or            invoke                  compensate           all completed child scopes
request-response operation                                                            in default order

Update the values of                                                          Invoke compensation on
                               assign             compensateScope
variables or partner links                                                  one completed child scope
with new data
Validate XML data stored                                                        Wait for a given time
                               validate                       wait            period or until a certain
in variables
                                                                                      time has passed

Generate a fault from inside   throw                        empty               No-op instruction for
the business process                                                              a business process


Forward a fault from                                                            Wrapper for language
                               rethrow            extensionActivity
inside a fault handler                                                                    extensions
                                                                                  process


Contained activities are                       flow                        pick                     Block and wait for a
executed in parallel,        A                                                                suitable message to arrive
partially ordered through
                                  B             C      M1 M2 … A                                           (or time out)
control links

Contained activities are                sequence                       forEach                     Contained activity is
performed sequentially in                                                                    performed sequentially or
lexical order                1.       2. … N.              1.        2. … N.                 in parallel, controlled by a
                                                                                              specified counter variable

Contained activity is                      while                 if-elseif-else                Select exactly one branch
repeated while a predicate                                                                       of activity from a set of
                                                      c1        c2
holds                             c                                    …                                          choices


Contained activity is                 repeatUntil                       scope               Associate contained activity
repeated until a predicate                                                                  with its own local variables,
holds                                      c                                                          partner links, etc.,
                                                                                                           and handlers
Scopes provide a context                                        process
which influences the
execution behavior of its                                                                        scope
enclosed activities                           scope

Local declarations –
partner links, message                 scope
exchanges, variables,                 scope

correlation sets
Local handlers – event
handlers, fault handlers, a
termination handler, and a
                                                                          primary activity
compensation handler                                      scope

Isolated scopes provide
control of concurrent                         scope   scope
                              scope                                        Termination handler to deal
access to shared resources
                                                        scope             with forced scope termination
                                                                                        (external faults)
                                                                               Compensation handler to
                                                                                undo persisted effects of
                                                                            already completed activities
                                                                                            process


                                                      scope   4. Compensate         fault
                                                              previous work      handler
                                                                              compensate
                         5. Propagate
                                          compensation
                         compensation          handler
                                            compensate
                                                                    3. The fault triggers
compensation                                                        the process-level
                                                                    fault handler
     handler
    invoke            6. Undo work compensation
  invoke
                      (in reverse order) handler
                                             invoke
                                         invoke


 1. Do some work (successfully invoke two services)                       invoke


                                                              2. Invoke another service
                                                              (throws fault)
<?xml version="1.0" encoding="utf-8"?>
<process name="insuranceSelectionProcess"
    targetNamespace="http://packtpub.com/bpel/example/"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:ins="http://packtpub.com/bpel/insurance/"
    xmlns:com="http://packtpub.com/bpel/company/" >

 <partnerLinks>
  <partnerLink name="client"
         partnerLinkType="com:selectionLT"
         myRole="insuranceSelectionService"/>

   <partnerLink name="insuranceA"
         partnerLinkType="ins:insuranceLT"
         myRole="insuranceRequester"
         partnerRole="insuranceService"/>

  <partnerLink name="insuranceB"
         partnerLinkType="ins:insuranceLT"
         myRole="insuranceRequester"
         partnerRole="insuranceService"/>
</partnerLinks>
…
<variables>
    <!-- input for BPEL process -->
    <variable name="InsuranceRequest"
           messageType="ins:InsuranceRequestMessage"/>
    <!-- output from insurance A -->
    <variable name="InsuranceAResposne"
           messageType="ins:InsuranceResponseMessage"/>
    <!-- output from insurance B -->
    <variable name="InsuranceBResposne"
           messageType="ins:InsuranceResponseMessage"/>
    <!-- output from BPEL process -->
    <variable name="InsuranceSelectionResponse"
           messageType="ins:InsuranceResponseMessage"/>
   </variables>
...
<sequence>
   <!-- Receive the initial request from client -->
   <receive partnerLink="client"
         portType="com:InsuranceSelectionPT"
         operation="SelectInsurance"
         variable="InsuranceRequest"
         createInstance="yes" />
   <!-- Make concurrent invocations to Insurance A and B -->
   <flow>

     <!-- Invoke Insurance A web service -->
     <invoke partnerLink="insuranceA"
           portType="ins:ComputeInsurancePremiumPT"
           operation="ComputeInsurancePremium"
           inputVariable="InsuranceRequest"
           outputVariable="InsuranceAResposne" />

     <!-- Invoke Insurance B web service -->
     <invoke partnerLink="insuranceB"
           portType="ins:ComputeInsurancePremiumPT"
           operation="ComputeInsurancePremium"
           inputVariable="InsuranceRequest"
           outputVariable="InsuranceBResposne" />

    </flow>
…
<!-- Select the best offer and construct the response -->
    <switch>
     <case condition="bpws:getVariableData('InsuranceAResposne',
                'confirmationData','/confirmationData/Amount')
              <= bpws:getVariableData('InsuranceBResposne',
                'confirmationData','/confirmationData/Amount')">
       <!-- Select Insurance A -->
       <assign>
        <copy>
         <from variable="InsuranceAResposne" />
         <to variable="InsuranceSelectionResponse" />
        </copy>
       </assign>
     </case>
     <otherwise>
       <!-- Select Insurance B -->
       <assign>
        <copy>
         <from variable="InsuranceBResposne" />
         <to variable="InsuranceSelectionResponse" />
        </copy>
       </assign>
     </otherwise>
    </switch>

   <!-- Send a response to the client -->
   <reply partnerLink="client"
        portType="com:InsuranceSelectionPT"
        operation="SelectInsurance"
        variable="InsuranceSelectionResponse"/>

 </sequence>
</process>
   Business Process 101
   Business Processes Automation & Web Service
    Standards
   WS-BPEL Overview
   Intalio BPMS BPEL Platform
   Future Directions for WS-BPEL Adoption
   Intalio released a BPMS platform community
    edition under the Mozilla Public License (MPL)
    in late 2006
       Lighter version of Enterprise BPMS platform
       BPEL platform based on Apache Geronimo
        application server
       Graphical developer tool based on Business Process
        Modeling Notation (BPMN)
       Web site for code, documentation, and tutorials:
        http://bpms.intalio.com
   Business Process 101
   Business Processes Automation & Web Service
    Standards
   WS-BPEL Overview
   BPEL Demonstration using Intalio BPMS
   Intalio BPMS BPEL Platform
   Active Endpoints ActiveBPEL
   BEA WebLogic
   Cape Clear Orchestrator
   Intalio/Apache Orchestration Director Engine (Ode)
   IBM WebSphere Process Server
   Microsoft BizTalk Server
   MidOffice BPEL Engine (open source)
   OpenLink Virtuoso Universal Server
   Oracle BPEL Process Manager
   Parasoft BPEL Maestro
   Progress Sonic BPEL Server
   SAP NetWeaver
   Sun eInsight BPM
   BPEL4People – human interactions
       http://www-
        128.ibm.com/developerworks/webservices/library/specificati
        on/ws-bpel4people/
   BPEL-SPE – subprocess coordination protocol
       http://www-
        128.ibm.com/developerworks/webservices/library/specificati
        on/ws-bpelsubproc/
   BPELJ – inline Java code in activities and expressions
       http://www-
        128.ibm.com/developerworks/library/specification/ws-bpelj/
   Currency with related standards
       WSDL 2.0, XPath 2.0, XQuery, etc.
               WS-BPEL 2.0
          www.oasis.org


                  WS-BPEL 2.0 Extensions for People (BPEL4People)
                  http://www-
                  128.ibm.com/developerworks/webservices/library/specification/
                  ws-bpel4people
                  WS-BPEL 2.0 Extensions for Sub-Processes (BPEL-SPE)
                  http://www-
                  128.ibm.com/developerworks/webservices/library/specification/
                  ws-bpelsubproc


                 WS-BPEL 2.0 Extensions for Java (BPELJ)
              Service Component Architecture (SCA)
                  http://
              SCA Assembly Model
ww.osoa.org   SCA WS-BPEL Client and Implementation Model
   Specifications published June 25, 2007


    http://www-128.ibm.com/developerworks/webservices/library/specification/ws-bpel4people/




   Next step: OASIS Technical Committee to be
    created to standardize BPEL4People and WS-
    HumanTask
   Integration of human-executed activities in
    Web services-based business processes
   Integration of human-executed activities in
    SOA-based applications
   Standard-based solution to support
    interoperability and portability scenarios
   BPEL4People
       Definition of human interactions within WS-BPEL
        processes
       Specification built on top of WS-BPEL 2.0
   WS-HumanTask
       Definition of service-enabled human tasks and
        notifications
       Coordination protocol used to control autonomy and
        life cycle of service-enabled human tasks in an
        interoperable manner
       Interoperable programming interface enabling task
        client applications to work with human tasks
   Similarities between SCA and WS-BPEL
     Both are described in a formal language that is based on XML
     Both languages may be used to describe a business service that is implemented by
       composing together other business services
     Both can describe inbound and outbound service interactions types by WSDL port
       types
   SCA describes the structure of an application
     Components within the business application
     Services offered by components – Service references components depend on
     Connections between components
     Endpoint addresses and communication methods used for the connections
     Policies applied to components and to the connections between them
   WS-BPEL describes the logic of a business process
     Sequences of operations which are performed to execute an individual business
       process
     Services provided and consumed through partnerLinks, that is, abstract interfaces
       that must be connected to actual endpoints and communication methods through
       configuration
   Though it is one of the first web service standards published, the
    mainstream adoption of WS-BPEL has been slow
       BPEL specification was never a complete programming language
       The implementation of web service solutions have focused on HST and JBOWS patterns
       Gaps in functionality have been filled through the use of other programming tools and
        vendor specific extensions
       Cross version and cross platform interoperability has been problematic to date
   WS-BPEL 2.0 standard specification provides promise for improvements
    in terms of interoperability and functionality, however challenges remain
       WS-HumanTask and BPEL4People highlight the need to add additional semantics to BPEL
       Significant presence of well-established and highly capable legacy workflow products on
        the market
       Critical mass of web-services to orchestrate are still in development
       No standard graphical notation for WS-BPEL as the OASIS standards committee deemed it
        out of scope
           The question of how to create direct visual representation of BPEL process descriptions still needs to
            be addressed - Vendor Specific Notations, Business Process Modeling Notation
           BPMN to BPEL 2.0 modeling tools
   SAP focused on formal business process
    workflows while Microsoft is focused on
    informal document workflows
       SAP application platform implementation deployed
        on Netweaver 7.0
         Implementation of business process automation using
         SAP PI which supports BPEL 2.0
       Microsoft collaboration implementation built on
        Sharepoint 2007
         Supports Microsoft WF as work flow engine
         Biztalk 2006  Netweaver PI to provide cross platform
         interoperability using BPEL 2.0

								
To top