SOA-basierte Business Integration mit Eclipse BPEL und Apache ODE Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
About us Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Tammo van Lessen, IAAS, Uni Stuttgart Research Associate @ IAAS Committer @ Apache Software Foundation PMC Member @ Apache ODE Simon Moser, IBM Corp.  Software Architect @ IBM Co-lead of the BPEL Designer Project  Member of the WS-BPEL Technical Committee at OASIS
The Talk Today Motivation & Background WS-BPEL Concepts Extensions Open Source BPEL Software Eclipse BPEL Apache ODE Demo Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) BPEL Background & Motivation
The Basis: Service Platform Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Messaging Quality  of Service Transport Description Transports Interface + Bindings Composite XML Non-XML Security Policy Discovery, Negotiation, Agreement Atomic Orchestration Protocols State Components Reliable Messaging Transactions
The Basis: Web Service Platform Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Messaging Quality  of Service Transport Description HTTP, SMTP, XMPP, TCP/IP, FTP, Tuple Spaces,… WSDL Composite SOAP, WS-A JMS, RMI/IIOP WS-Security* WS-Policy* UDDI, WS-A, WS-MEX, WSIL Atomic BPEL WS-C, WS-CDL,  BPEL4Chor WSRF Components WSRM WS-AT, WS-BA,…
Why Orchestration? Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) ??? To achieve a business goal, you often need more than one service… Which to use, in which order, how to use them?
Web Service Orchestration Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) BPEL!
The Notion of Orchestration: Deja Vu Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Workflow Business Functions
The Notion of Orchestration: Deja Vu Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Orchestration Web Services
What is BPEL? Business Process Execution Language 7/02 IBM & MS, 5/03 +BEA+SAP+Siebel, 4/07 OASIS Standard High-level programming language Recursive Model BPEL has native support for Long running processes Scalability Concurrency Message and instance correlation Fault handling Compensation based recovery Phoenix behaviour Most important: BPEL is standard and supported the most important vendors. Defined Execution Semantics Abstract Processes (protocols, “views” on internal processes) Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
What is BPEL not? “ BPEL is block-structured only and therefore not usable for business users” “ BPEL does not support multiple transport protocols” Look at WSDL “ BPEL interactions are only synchronous” Look at WSDL “ Look at this ugly XML, business people won’t understand this cumbersome stuff” Not meant to be hand-written, use tools! BPEL is not a modelling notation Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
BPEL’s Foundation Web Services WSDL 1.1 – abstract part (concrete part    ESB) (SOAP) (WS-Addressing) Flow Control Block structured (nested blocks) Graph-based flows (using <flow>) Data Model W3C XML Schema 1.0 XML InfoSet XPath 1.0 XSLT 1.0 Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
Variables & Data Manipulation No explicit data flow Variables Shared variables, statically typed via WSDL messages, XSD elements or XSD types “ Global” process variables and “local” scoped variables (Strong type system) Assigning variable values By receiving a message from a partner service By invoking a partner service and storing the result into a variable Copying (parts) of variables into other variables <assign> Drawbacks: Quite cumbersome, requires often XSLT Look at E4X and BPELJ, XPath functions Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
Partner Links Partner Links / Partner Link Types Partner Links define “contract channels” between partners Mutual call-back dependency Associates interfaces (pTs) with roles Partner Links define which partner takes which role Key concept to enable asynchronous messaging! Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
Partner Links Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) process partner link partner link type Peer-to-peer conversational partner relationship WSDL port type myRole Provided port type WSDL port type partnerRole Required port type receive Inbound request – service provided by the process invoke Outbound request – service required by the process “ I expect from my partner  an implementation of this!”
Properties and Correlation Sets Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) 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) Process 3 (0815,42) Process 2 (4711,37) Process 1 (0815,12) 0815 42 Message 2 customerID orderNumber 4711 37 Message 1
Properties and Correlation Sets Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) process How to identify stateful instances via stateless Web service interfaces? initiate process instance 3 correlation set customerId orderNumber process instance 1 process instance 2 process instance 4 receive Submit purchase order Messages in long-running conversations are correlated to the correct process instance locate purchaseOrder cId = 0815 orderNo = 42 receive Query order status queryOrderStatus custId = 0815 oNo = 42 customerId orderNumber 4 (0815, 49) 3 (0815, 42) 2 (0707, 11) 1 (0311, 33) process instance 3
Fault Handling & Compensation Fault Handling Like in Java, enables alternative execution paths Can trigger compensation Compensation ACID Transactions are not applicable when dealing with long running processes Compensation-based recovery Compensation Handler can reverse the work performed by an already completed scope Compensation Handler is “installed” after successful execution of a scope Compensation can only be triggered by fault/compensation/termination handler of the enclosing scope Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
Fault and Compensation Handling Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
Modelling Styles Block structured modelling Nesting of structured activities Use of  <flow>  activity for parallelism Graph based modelling <flow> activity with links Transition conditions & join conditions Dead-Path-Elimination Acyclic graph to ensure sound execution semantics Loops can be realized with <while> / <repeatUntil> / <forEach> Not supported by Sun & Oracle! Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) t 1 t 2 j
Modelling Styles: Example Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
BPEL 2.0 Activities Basic Activities Structured Activities receive reply invoke assign validate throw rethrow exit compensateScope compensate wait empty extensionActivity forEach sequence 2. N. 1. … flow B C A while c repeatUntil c if-elseif-else c1 c2 … 2. N. 1. … pick … A M2 M1 scope
BPEL4People/WS-HT Support for Human Tasks Standardization Committee at OASIS currently active BPEL-SPE Support for sub-processes Autonomy is key BPELJ Use Java in BPEL Activities Use Java types in BPEL BPEL4SWS Support for Semantic Web Services (Service Discovery) Data Mediation BPEL light WSDL-less BPEL Is about message exchanges BPEL JS/E4X Use JavaScript/E4X for variable assignments BPEL Extensions
Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Open Source BPEL Software
BPEL Modelling: Eclipse BPEL Support of BPEL4WS 1.1 (in version 0.1) Support of WS-BPEL 2.0 … …  all standard activities are supported  No full support of extensibility mechanisms yet (incl. extensionActivity)  Partial support of abstract BPEL Graphical & XML modelling mode Tightly integrated with Eclipse Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
BPEL Execution: Apache ODE BPEL 1.1 and 2.0 supported Fast and scalable process engine Modular design & embeddable 3 deployment targets supported Web container (Axis2) JBI (ServiceMix) SCA (Tuscany) Implicit Message Correlation Via HTTP headers and WS-Addressing Supports BPEL extensibility Robustness Management and Auditing Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
Integration Efforts  Editor for ODE deployment descriptor is shipped with Eclipse BPEL Designer (as of M4) Runtime integration for local ODE server (Web container deployment) Planned: Integrated unit testing of BPEL processes using BPELUnit (GSoC’09) Planned: Web-based Debugger based on ODE and Oryx (GSoC’09) Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Demo
Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Q&A Thank you for your attention!
Further Reading Apache ODE http://ode.apache.org   WS-BPEL 2.0 compliance:  http://snurl.com/gd4hd   Eclipse BPEL http://www.eclipse.org/bpel Integration ODE/Eclipse Tutorial available at  http://snurl.com/ejl1j   Additional BPEL/ODE/Eclipse tutorials http://snurl.com/gd3zi   Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)

SOA-based Business Integration with Eclipse BPEL and Apache ODE

  • 1.
    SOA-basierte Business Integrationmit Eclipse BPEL und Apache ODE Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 2.
    About us Tammovan Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Tammo van Lessen, IAAS, Uni Stuttgart Research Associate @ IAAS Committer @ Apache Software Foundation PMC Member @ Apache ODE Simon Moser, IBM Corp. Software Architect @ IBM Co-lead of the BPEL Designer Project Member of the WS-BPEL Technical Committee at OASIS
  • 3.
    The Talk TodayMotivation & Background WS-BPEL Concepts Extensions Open Source BPEL Software Eclipse BPEL Apache ODE Demo Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 4.
    Tammo van Lessen(IAAS, Uni Stuttgart) & Simon Moser (IBM) BPEL Background & Motivation
  • 5.
    The Basis: ServicePlatform Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Messaging Quality of Service Transport Description Transports Interface + Bindings Composite XML Non-XML Security Policy Discovery, Negotiation, Agreement Atomic Orchestration Protocols State Components Reliable Messaging Transactions
  • 6.
    The Basis: WebService Platform Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Messaging Quality of Service Transport Description HTTP, SMTP, XMPP, TCP/IP, FTP, Tuple Spaces,… WSDL Composite SOAP, WS-A JMS, RMI/IIOP WS-Security* WS-Policy* UDDI, WS-A, WS-MEX, WSIL Atomic BPEL WS-C, WS-CDL, BPEL4Chor WSRF Components WSRM WS-AT, WS-BA,…
  • 7.
    Why Orchestration? Tammovan Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) ??? To achieve a business goal, you often need more than one service… Which to use, in which order, how to use them?
  • 8.
    Web Service OrchestrationTammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) BPEL!
  • 9.
    The Notion ofOrchestration: Deja Vu Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Workflow Business Functions
  • 10.
    The Notion ofOrchestration: Deja Vu Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Orchestration Web Services
  • 11.
    What is BPEL?Business Process Execution Language 7/02 IBM & MS, 5/03 +BEA+SAP+Siebel, 4/07 OASIS Standard High-level programming language Recursive Model BPEL has native support for Long running processes Scalability Concurrency Message and instance correlation Fault handling Compensation based recovery Phoenix behaviour Most important: BPEL is standard and supported the most important vendors. Defined Execution Semantics Abstract Processes (protocols, “views” on internal processes) Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 12.
    What is BPELnot? “ BPEL is block-structured only and therefore not usable for business users” “ BPEL does not support multiple transport protocols” Look at WSDL “ BPEL interactions are only synchronous” Look at WSDL “ Look at this ugly XML, business people won’t understand this cumbersome stuff” Not meant to be hand-written, use tools! BPEL is not a modelling notation Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 13.
    BPEL’s Foundation WebServices WSDL 1.1 – abstract part (concrete part  ESB) (SOAP) (WS-Addressing) Flow Control Block structured (nested blocks) Graph-based flows (using <flow>) Data Model W3C XML Schema 1.0 XML InfoSet XPath 1.0 XSLT 1.0 Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 14.
    Variables & DataManipulation No explicit data flow Variables Shared variables, statically typed via WSDL messages, XSD elements or XSD types “ Global” process variables and “local” scoped variables (Strong type system) Assigning variable values By receiving a message from a partner service By invoking a partner service and storing the result into a variable Copying (parts) of variables into other variables <assign> Drawbacks: Quite cumbersome, requires often XSLT Look at E4X and BPELJ, XPath functions Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 15.
    Partner Links PartnerLinks / Partner Link Types Partner Links define “contract channels” between partners Mutual call-back dependency Associates interfaces (pTs) with roles Partner Links define which partner takes which role Key concept to enable asynchronous messaging! Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 16.
    Partner Links Tammovan Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) process partner link partner link type Peer-to-peer conversational partner relationship WSDL port type myRole Provided port type WSDL port type partnerRole Required port type receive Inbound request – service provided by the process invoke Outbound request – service required by the process “ I expect from my partner an implementation of this!”
  • 17.
    Properties and CorrelationSets Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) 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) Process 3 (0815,42) Process 2 (4711,37) Process 1 (0815,12) 0815 42 Message 2 customerID orderNumber 4711 37 Message 1
  • 18.
    Properties and CorrelationSets Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) process How to identify stateful instances via stateless Web service interfaces? initiate process instance 3 correlation set customerId orderNumber process instance 1 process instance 2 process instance 4 receive Submit purchase order Messages in long-running conversations are correlated to the correct process instance locate purchaseOrder cId = 0815 orderNo = 42 receive Query order status queryOrderStatus custId = 0815 oNo = 42 customerId orderNumber 4 (0815, 49) 3 (0815, 42) 2 (0707, 11) 1 (0311, 33) process instance 3
  • 19.
    Fault Handling &Compensation Fault Handling Like in Java, enables alternative execution paths Can trigger compensation Compensation ACID Transactions are not applicable when dealing with long running processes Compensation-based recovery Compensation Handler can reverse the work performed by an already completed scope Compensation Handler is “installed” after successful execution of a scope Compensation can only be triggered by fault/compensation/termination handler of the enclosing scope Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 20.
    Fault and CompensationHandling Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 21.
    Modelling Styles Blockstructured modelling Nesting of structured activities Use of <flow> activity for parallelism Graph based modelling <flow> activity with links Transition conditions & join conditions Dead-Path-Elimination Acyclic graph to ensure sound execution semantics Loops can be realized with <while> / <repeatUntil> / <forEach> Not supported by Sun & Oracle! Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) t 1 t 2 j
  • 22.
    Modelling Styles: ExampleTammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 23.
    BPEL 2.0 ActivitiesBasic Activities Structured Activities receive reply invoke assign validate throw rethrow exit compensateScope compensate wait empty extensionActivity forEach sequence 2. N. 1. … flow B C A while c repeatUntil c if-elseif-else c1 c2 … 2. N. 1. … pick … A M2 M1 scope
  • 24.
    BPEL4People/WS-HT Support forHuman Tasks Standardization Committee at OASIS currently active BPEL-SPE Support for sub-processes Autonomy is key BPELJ Use Java in BPEL Activities Use Java types in BPEL BPEL4SWS Support for Semantic Web Services (Service Discovery) Data Mediation BPEL light WSDL-less BPEL Is about message exchanges BPEL JS/E4X Use JavaScript/E4X for variable assignments BPEL Extensions
  • 25.
    Tammo van Lessen(IAAS, Uni Stuttgart) & Simon Moser (IBM) Open Source BPEL Software
  • 26.
    BPEL Modelling: EclipseBPEL Support of BPEL4WS 1.1 (in version 0.1) Support of WS-BPEL 2.0 … … all standard activities are supported No full support of extensibility mechanisms yet (incl. extensionActivity) Partial support of abstract BPEL Graphical & XML modelling mode Tightly integrated with Eclipse Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 27.
    BPEL Execution: ApacheODE BPEL 1.1 and 2.0 supported Fast and scalable process engine Modular design & embeddable 3 deployment targets supported Web container (Axis2) JBI (ServiceMix) SCA (Tuscany) Implicit Message Correlation Via HTTP headers and WS-Addressing Supports BPEL extensibility Robustness Management and Auditing Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 28.
    Integration Efforts Editor for ODE deployment descriptor is shipped with Eclipse BPEL Designer (as of M4) Runtime integration for local ODE server (Web container deployment) Planned: Integrated unit testing of BPEL processes using BPELUnit (GSoC’09) Planned: Web-based Debugger based on ODE and Oryx (GSoC’09) Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)
  • 29.
    Tammo van Lessen(IAAS, Uni Stuttgart) & Simon Moser (IBM) Demo
  • 30.
    Tammo van Lessen(IAAS, Uni Stuttgart) & Simon Moser (IBM) Q&A Thank you for your attention!
  • 31.
    Further Reading ApacheODE http://ode.apache.org WS-BPEL 2.0 compliance: http://snurl.com/gd4hd Eclipse BPEL http://www.eclipse.org/bpel Integration ODE/Eclipse Tutorial available at http://snurl.com/ejl1j Additional BPEL/ODE/Eclipse tutorials http://snurl.com/gd3zi Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM)