Topic 3

     Business Process Management
              using BPEL



Assoc.Prof.Dr. Thanachart Numnonda
        www.imcinstitute.com
Agenda
 Benefits   of BPM?
 What   is BPEL?
 BPEL Tools   & Engines




                             2
Benefits of BPM?




                   3
SOA Framework Recap

   User Interface Dashboard (KPI)‫‏‬

User Interface + Single Window (Portal)

Business Process Management (BPEL)‫‏‬

   Build Re-usable Services (ESB)‫‏‬

      External/Internal Systems

                                     4
Business process
   A real-world activity consisting of a set of logically
    related tasks
   When performed in the appropriate sequence, and
    according to the correct business rules produces a
    business outcome
Example Business Process
Components of a business process
•    Trigger event
•    Input to the process
•    Tasks that need to be carried out
•    Sequence or order of the tasks
•    Exception scenario
•    Output of the process
Process oriented organization
•   Capability Maturity Model Integration (CMMI)
     –   Level 0: Not performed
     –   Level 1: Performed
     –   Level 2: Managed
     –   Level 3: Defined
     –   Level 4: Quantitatively managed
     –   Level 5: Optimizing
•   Before you can automated process. It must be well
    understood and well defined => Level 2
Business Process Management
   BPM is discipline that covers all aspects of defining
    and performing business process.
   It has the following components
       –   Define the business process
       –   Establish the business process
       –   Put the process into practice
       –   Monitor and control the process
       –   Improve the business process
BPM Benefit
   Reduce the impedance mismatch between business
    requirements and IT systems
   Increase employee productivity and reduce operational
    costs
   Increase corporate agility and flexibility
   Reduce development costs and effort
Business Process and SOA
   SOA is an approach for application integration
   The most important SOA concept is composition of
    services into business processes.
   Services are composed in a particular order and
    provide a set of rule to provide support for business
    processes
   It also enable us to modify business processes quickly
   implementation of a BPM system and the ability to
    more easily create, manage, and maintain composite
    applications
Silo IT
SOA and Web Services
Business Process Layer
BPM without Services
Business Process Approach
   Orchestration
     Business   Process with central coordinator
     WS-BPEL

   Choreography
     Business   Collaboration
     WS-CDL
Orchestration
Choreography
What is BPEL?




                19
Business Process Languages
•   BPEL / WS-BPEL : OASIS Standard
•   XLANG and the new version XLANG/s from Microsoft
•   BPML (Business Process Modeling Language) from
    BPMI.org
•   WS-CDL (Web Services Choreography Description
    Language)
•   BPSS (Business Process Specification Schema), part of the
    ebXML framework
WS- BPEL
• Web Service- Business Process Execution Language
• Version 1.0 released by IBM, Microsoft and BEA in Aug 2002
• Version 1.1 submitted to OASIS April 2003
• Version 2.0 available (2007)
• XML language for describing business processes based on
  Web services
    •   Convergence of XLANG (Microsoft) and WSFL (IBM)
• Unprecendented industry consensus
    •   IBM, Microsoft, Oracle, Sun, BEA, SAP, Siebel …
BPEL Is a Web Service Sequencing
            Language
• Process defines “conversation” flow chart
   – Conversation consists of only WSDL-described message
     exchanges.
• Process instance is a particular conversation
  following the chart
   – Execution systems can support multiple concurrent
     conversations.
Value Proposition of WS-BPEL
• Portable business processes
   – Built on top of an interoperable infrastructure of Web
     services
• Industry wide language for business processes
   – Common skill set and language for developers
• Choice of process engines
   – Standards lead to competitive offerings
Developing BPEL
•   Requires a good understanding of WSDL
•   Knowledge of XML / BPEL commands
•   For ease , uses modeling diagram like BPMN or
    UML
BPEL Document Structure
<process>
   <!– Definition and roles of process participants -->
   <partnerLinks> ... </partnerLinks>
    <!- Data/state used within the process -->
   <variables> ... </variables>
    <!- Properties that enable conversations -->
   <correlationSets> ... </correlationSets>
    <!- Exception handling -->
   <faultHandlers> ... </faultHandlers>
        <!- Error recovery – undoing actions -->
   <compensationHandlers> ... </compensationHandlers>
    <!- Concurrent events with process itself -->
   <eventHandlers> ... </eventHandlers>
    <!- Business process flow -->
    (activities)*
</process>
BPEL Activities
Basic Activities            Structured Activities
 <invoke>                   <sequence>

 <receive>                  <while>

 <reply>                    <pick>

 <assign>                   <flow>

 <throw>                    <scope>

 <wait>                     <compensate>

 <empty>                    <switch>

                             <link>
BPEL: Basic Activities
   <invoke>
       To invoke a one-way or request/response operation on a
        portType offered by a partner
   <receive>
     To do a blocking wait for a matching message to arrive
     Can be the instantiator of the business process
   <reply>
     To send a message in reply to a message that was received
      through a <receive>
     The combination of a <receive> and a <reply> forms a
      request-response operation on the WSDL portType for the
      process
BPEL: Basic Activities (cont.)
   <assign>
     Can be used to update the values of variables with new data
   <throw>
       Generates a fault from inside the business process
   <wait>
       Allows you to wait for a given time period or until a certain
        time has passed
   <empty>
       Allows you to insert a "no-op" instruction into a business
        process
       This is useful for synchronization of concurrent activities, for
        instance
BPEL: Structured Activities
   <sequence>
     Perform   activities in sequential order
   <flow>
     Perform   activities in parallel
   <switch>
     Conditional   choice of activities
   <scope>
     Enclose   multiple activities in a single scope
Example Business Process
                     Receive                              <sequence>
                      <PO>




      Invoke                     Invoke <CreditService>      <flow>
<InventoryService>




                       Reply                              </sequence>
                     <Invoice>
Sample Activities in BPEL
<sequence>
 <receive partnerLink=“customer” portType=“lns:purchaseOrderPT"
            operation=“sendPurchaseOrder” variable=“PO”
            createInstance="yes" />
 <flow>
  <invoke partnerLink=“inventoryChecker” portType=“lns:inventoryPT”
           operation="checkINV" inputVariable="inventoryRequest"
           outputVariable="inventoryResponse" />

  <invoke partnerLink="creditChecker" portType=“lns:creditPT"
           operation="checkCRED" inputVariable="creditRequest"
           outputVariable="creditResponse" />
 </flow>
 ...
 <reply partnerLink=“customer” portType=“lns:purchaseOrderPT”
         operation=“sendPurchaseOrder” variable=“invoice"/>
</sequence>
Simple BPEL Graphic Editor
BPEL Tools & Engine




                 34
BPEL Components
BPEL Designer Tools
•   IDE can be used to write BPEL or BPMN
•   Examples:
     –   NetBeans 6.1/6.5
     –   Eclipse
     –   Oracle Jdeveloper 10g
     –   IBM WebSphere Studio




                                     36
BPEL Server
•   Provides a run time environment for executing
    BPEL
•   Examples
     –   GlassFishESB (via BPEL SE)
     –   Oracle BPEL Process Manager
     –   Microosoft Biztalk
     –   Sun Java CAPS
     –   IBM WebSphere Business Integration Server
     –   Active BPEL Engine
     –   Apache Agila

                                           37
NetBeans BPEL Editor




                  38
Example : BPEL




                 39
GlassFish BPEL SE
•   GlassFish V2 has OpenESB
•   Project OpenESB implements ESB runtime using
    Java Business Integration (JBI) as the foundation
•   JBI container has BPEL SE (Service Engine)




                                         40
Resources
   Business Process Execution Language for Web
    Services, Matjaz B. Juric
   Java SOA Cookbook, Eben Hewitt
   Building SOA-Based Composite Applications Using
    NetBeans IDE 6, David Salter
   Understanding SOA with Web Services, Eric
    Newcomer
   SOA in Practice, Nicolai M. Josuttis
   Service Oriented Architecture Field Guide for
    Executives, Kyle Gabhart and Biphas Bhattacharaya

                                         41
Thank you

   thananum@gmail.com
www.facebook.com/imcinstitute
   www.imcinstitute.com



                                42

Service Oriented Architecture [3/5] : Business Process Management using BPEL

  • 1.
    Topic 3 Business Process Management using BPEL Assoc.Prof.Dr. Thanachart Numnonda www.imcinstitute.com
  • 2.
    Agenda  Benefits of BPM?  What is BPEL?  BPEL Tools & Engines 2
  • 3.
  • 4.
    SOA Framework Recap User Interface Dashboard (KPI)‫‏‬ User Interface + Single Window (Portal) Business Process Management (BPEL)‫‏‬ Build Re-usable Services (ESB)‫‏‬ External/Internal Systems 4
  • 5.
    Business process  A real-world activity consisting of a set of logically related tasks  When performed in the appropriate sequence, and according to the correct business rules produces a business outcome
  • 6.
  • 7.
    Components of abusiness process • Trigger event • Input to the process • Tasks that need to be carried out • Sequence or order of the tasks • Exception scenario • Output of the process
  • 8.
    Process oriented organization • Capability Maturity Model Integration (CMMI) – Level 0: Not performed – Level 1: Performed – Level 2: Managed – Level 3: Defined – Level 4: Quantitatively managed – Level 5: Optimizing • Before you can automated process. It must be well understood and well defined => Level 2
  • 9.
    Business Process Management  BPM is discipline that covers all aspects of defining and performing business process.  It has the following components – Define the business process – Establish the business process – Put the process into practice – Monitor and control the process – Improve the business process
  • 10.
    BPM Benefit  Reduce the impedance mismatch between business requirements and IT systems  Increase employee productivity and reduce operational costs  Increase corporate agility and flexibility  Reduce development costs and effort
  • 11.
    Business Process andSOA  SOA is an approach for application integration  The most important SOA concept is composition of services into business processes.  Services are composed in a particular order and provide a set of rule to provide support for business processes  It also enable us to modify business processes quickly  implementation of a BPM system and the ability to more easily create, manage, and maintain composite applications
  • 12.
  • 13.
    SOA and WebServices
  • 14.
  • 15.
  • 16.
    Business Process Approach  Orchestration  Business Process with central coordinator  WS-BPEL  Choreography  Business Collaboration  WS-CDL
  • 17.
  • 18.
  • 19.
  • 21.
    Business Process Languages • BPEL / WS-BPEL : OASIS Standard • XLANG and the new version XLANG/s from Microsoft • BPML (Business Process Modeling Language) from BPMI.org • WS-CDL (Web Services Choreography Description Language) • BPSS (Business Process Specification Schema), part of the ebXML framework
  • 22.
    WS- BPEL • WebService- Business Process Execution Language • Version 1.0 released by IBM, Microsoft and BEA in Aug 2002 • Version 1.1 submitted to OASIS April 2003 • Version 2.0 available (2007) • XML language for describing business processes based on Web services • Convergence of XLANG (Microsoft) and WSFL (IBM) • Unprecendented industry consensus • IBM, Microsoft, Oracle, Sun, BEA, SAP, Siebel …
  • 23.
    BPEL Is aWeb Service Sequencing Language • Process defines “conversation” flow chart – Conversation consists of only WSDL-described message exchanges. • Process instance is a particular conversation following the chart – Execution systems can support multiple concurrent conversations.
  • 24.
    Value Proposition ofWS-BPEL • Portable business processes – Built on top of an interoperable infrastructure of Web services • Industry wide language for business processes – Common skill set and language for developers • Choice of process engines – Standards lead to competitive offerings
  • 25.
    Developing BPEL • Requires a good understanding of WSDL • Knowledge of XML / BPEL commands • For ease , uses modeling diagram like BPMN or UML
  • 26.
    BPEL Document Structure <process> <!– Definition and roles of process participants --> <partnerLinks> ... </partnerLinks> <!- Data/state used within the process --> <variables> ... </variables> <!- Properties that enable conversations --> <correlationSets> ... </correlationSets> <!- Exception handling --> <faultHandlers> ... </faultHandlers> <!- Error recovery – undoing actions --> <compensationHandlers> ... </compensationHandlers> <!- Concurrent events with process itself --> <eventHandlers> ... </eventHandlers> <!- Business process flow --> (activities)* </process>
  • 27.
    BPEL Activities Basic Activities Structured Activities  <invoke>  <sequence>  <receive>  <while>  <reply>  <pick>  <assign>  <flow>  <throw>  <scope>  <wait>  <compensate>  <empty>  <switch>  <link>
  • 28.
    BPEL: Basic Activities  <invoke>  To invoke a one-way or request/response operation on a portType offered by a partner  <receive>  To do a blocking wait for a matching message to arrive  Can be the instantiator of the business process  <reply>  To send a message in reply to a message that was received through a <receive>  The combination of a <receive> and a <reply> forms a request-response operation on the WSDL portType for the process
  • 29.
    BPEL: Basic Activities(cont.)  <assign>  Can be used to update the values of variables with new data  <throw>  Generates a fault from inside the business process  <wait>  Allows you to wait for a given time period or until a certain time has passed  <empty>  Allows you to insert a "no-op" instruction into a business process  This is useful for synchronization of concurrent activities, for instance
  • 30.
    BPEL: Structured Activities  <sequence>  Perform activities in sequential order  <flow>  Perform activities in parallel  <switch>  Conditional choice of activities  <scope>  Enclose multiple activities in a single scope
  • 31.
    Example Business Process Receive <sequence> <PO> Invoke Invoke <CreditService> <flow> <InventoryService> Reply </sequence> <Invoice>
  • 32.
    Sample Activities inBPEL <sequence> <receive partnerLink=“customer” portType=“lns:purchaseOrderPT" operation=“sendPurchaseOrder” variable=“PO” createInstance="yes" /> <flow> <invoke partnerLink=“inventoryChecker” portType=“lns:inventoryPT” operation="checkINV" inputVariable="inventoryRequest" outputVariable="inventoryResponse" /> <invoke partnerLink="creditChecker" portType=“lns:creditPT" operation="checkCRED" inputVariable="creditRequest" outputVariable="creditResponse" /> </flow> ... <reply partnerLink=“customer” portType=“lns:purchaseOrderPT” operation=“sendPurchaseOrder” variable=“invoice"/> </sequence>
  • 33.
  • 34.
    BPEL Tools &Engine 34
  • 35.
  • 36.
    BPEL Designer Tools • IDE can be used to write BPEL or BPMN • Examples: – NetBeans 6.1/6.5 – Eclipse – Oracle Jdeveloper 10g – IBM WebSphere Studio 36
  • 37.
    BPEL Server • Provides a run time environment for executing BPEL • Examples – GlassFishESB (via BPEL SE) – Oracle BPEL Process Manager – Microosoft Biztalk – Sun Java CAPS – IBM WebSphere Business Integration Server – Active BPEL Engine – Apache Agila 37
  • 38.
  • 39.
  • 40.
    GlassFish BPEL SE • GlassFish V2 has OpenESB • Project OpenESB implements ESB runtime using Java Business Integration (JBI) as the foundation • JBI container has BPEL SE (Service Engine) 40
  • 41.
    Resources  Business Process Execution Language for Web Services, Matjaz B. Juric  Java SOA Cookbook, Eben Hewitt  Building SOA-Based Composite Applications Using NetBeans IDE 6, David Salter  Understanding SOA with Web Services, Eric Newcomer  SOA in Practice, Nicolai M. Josuttis  Service Oriented Architecture Field Guide for Executives, Kyle Gabhart and Biphas Bhattacharaya 41
  • 42.
    Thank you thananum@gmail.com www.facebook.com/imcinstitute www.imcinstitute.com 42