Successfully reported this slideshow.

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Web Service Composition mit WS-BPEL und dem Open-Source-Orchester

  1. 1. Web Service Composition mit WS-BPEL und dem Open-Source-Orchester Tammo van Lessen Daniel Lübke Simon Moser
  2. 2. About us <ul><li>Tammo van Lessen </li></ul><ul><ul><li>SOA/BPM consultant </li></ul></ul><ul><ul><li>Committer & PMC Member @ Apache ODE </li></ul></ul><ul><ul><li>Member of the BPMN 2.0 FTF at OMG (representing Intalio, Inc.) </li></ul></ul><ul><li>Simon Moser </li></ul><ul><ul><li>Software Architect @ IBM </li></ul></ul><ul><ul><li>Co-lead of the BPEL Designer Project </li></ul></ul><ul><ul><li>Member of the WS-BPEL Technical Committee at OASIS </li></ul></ul><ul><li>Daniel Lübke </li></ul><ul><ul><li>Senior Consultant @ innoQ Schweiz </li></ul></ul><ul><ul><li>Architect in MDA & SOA Projects </li></ul></ul><ul><ul><li>BPELUnit Maintainer </li></ul></ul>
  3. 3. The Talk Today <ul><li>Motivation & Background </li></ul><ul><li>WS-BPEL </li></ul><ul><ul><li>Concepts </li></ul></ul><ul><ul><li>Extensions </li></ul></ul><ul><li>BPEL Open Source Orchestra </li></ul><ul><ul><li>Eclipse BPEL Designer </li></ul></ul><ul><ul><li>BPELUnit </li></ul></ul><ul><ul><li>Apache ODE </li></ul></ul><ul><li>Demo </li></ul>
  4. 4. BPEL Background & Motivation
  5. 5. The Base: Service Platform 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. 6. The Base: Web Services 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. 7. Why Orchestration? ??? To achieve a business goal, you often need more than one service… Which to use, in which order, how to use them?
  8. 8. Web Service Orchestration BPEL!
  9. 9. What is BPEL? <ul><li>Business Process Execution Language, since 4/07 OASIS Standard </li></ul><ul><li>High-level programming language </li></ul><ul><li>Recursive Model </li></ul><ul><li>BPEL has native support for </li></ul><ul><ul><li>Long running processes </li></ul></ul><ul><ul><li>Scalability </li></ul></ul><ul><ul><li>Concurrency </li></ul></ul><ul><ul><li>Message and instance correlation </li></ul></ul><ul><ul><li>Fault handling </li></ul></ul><ul><ul><li>Compensation based recovery </li></ul></ul><ul><ul><li>Phoenix behaviour </li></ul></ul><ul><ul><li>Most important: BPEL is standard and supported by most important vendors. </li></ul></ul><ul><li>Defined Execution Semantics </li></ul><ul><li>Abstract Processes (protocols, “views” on internal processes) </li></ul>
  10. 10. What is BPEL not? <ul><li>“ BPEL is block-structured only and therefore not usable for business users” </li></ul><ul><li>“ BPEL does not support multiple transport protocols” </li></ul><ul><ul><li>Look at WSDL </li></ul></ul><ul><li>“ BPEL interactions are only synchronous” </li></ul><ul><ul><li>Look at WSDL </li></ul></ul><ul><li>“ Look at this ugly XML, business people won’t understand this cumbersome stuff” </li></ul><ul><ul><li>Not meant to be hand-written, use tools! </li></ul></ul><ul><li>BPEL is not a modeling notation </li></ul>
  11. 11. BPEL’s Foundation <ul><li>Web Services </li></ul><ul><ul><li>WSDL 1.1 – abstract part (concrete part  ESB) </li></ul></ul><ul><ul><li>(SOAP) </li></ul></ul><ul><ul><li>(WS-Addressing) </li></ul></ul><ul><li>Flow Control </li></ul><ul><ul><li>Block structured (nested blocks) </li></ul></ul><ul><ul><li>Graph-based flows (using <flow>) </li></ul></ul><ul><li>Data Model </li></ul><ul><ul><li>W3C XML Schema 1.0 </li></ul></ul><ul><ul><li>XML InfoSet </li></ul></ul><ul><ul><li>XPath 1.0 </li></ul></ul><ul><ul><li>XSLT 1.0 </li></ul></ul>
  12. 12. BPEL 2.0 Activities compensateScope compensate Basic Activities Structured Activities receive reply invoke assign validate throw rethrow exit 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
  13. 13. Partner Links / Partner Link Types process partner link partner link type Peer-to-peer conversational partner relationship “ I expect from my partner an implementation of this!” <ul><ul><li>Define “contract channels” between partners - Key concept to enable asynchronous messaging! </li></ul></ul>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
  14. 14. Properties and Correlation Sets <ul><li>How to identify stateful instances via stateless WS interfaces? </li></ul><ul><li>A process instance is assigned one or more keys </li></ul><ul><ul><li>Business data is used as key, e.g., customerID </li></ul></ul><ul><ul><li>A key can be compound, e.g., (customerID, orderNumber) </li></ul></ul><ul><ul><li>WS-BPEL calls a key a correlation set – it is used to correlate an incoming message with a process instance </li></ul></ul>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
  15. 15. Fault Handling & Compensation <ul><li>Fault Handling </li></ul><ul><ul><li>Like in Java, enables alternative execution paths </li></ul></ul><ul><ul><li>Can trigger compensation </li></ul></ul><ul><li>Compensation </li></ul><ul><ul><li>ACID Transactions are not applicable when dealing with long running processes </li></ul></ul><ul><ul><li>Compensation-based recovery </li></ul></ul><ul><ul><ul><li>Compensation Handler can reverse the work performed by an already completed scope </li></ul></ul></ul><ul><ul><ul><li>Compensation Handler is “installed” after successful execution of a scope </li></ul></ul></ul><ul><ul><ul><li>Compensation can only be triggered by fault/compensation/termination handler of the enclosing scope </li></ul></ul></ul>
  16. 16. Fault and Compensation Handling
  17. 17. Modelling Styles <ul><li>Block structured modelling </li></ul><ul><ul><li>Nesting of structured activities </li></ul></ul><ul><ul><li>Use of <flow> activity for parallelism </li></ul></ul><ul><li>Graph based modelling </li></ul><ul><ul><li><flow> activity with links </li></ul></ul><ul><ul><li>Transition conditions & join conditions </li></ul></ul><ul><ul><li>Dead-Path-Elimination </li></ul></ul><ul><ul><li>Acyclic graph to ensure sound execution semantics </li></ul></ul><ul><ul><li>Loops can be realized with <while> / <repeatUntil> / <forEach> </li></ul></ul><ul><ul><li>Not supported by Sun & Oracle! </li></ul></ul>t 1 t 2 j
  18. 18. Modeling Styles: Example
  19. 19. <ul><li>BPEL4People/WS-HT </li></ul><ul><ul><li>Support for Human Tasks </li></ul></ul><ul><ul><li>Standardization Committed at OASIS currently being formed </li></ul></ul><ul><li>BPEL-SPE </li></ul><ul><ul><li>Support for sub-processes </li></ul></ul><ul><ul><li>Autonomy is key </li></ul></ul><ul><li>BPELJ </li></ul><ul><ul><li>Use Java in BPEL Activities </li></ul></ul><ul><ul><li>Use Java types in BPEL </li></ul></ul><ul><li>BPEL4SWS </li></ul><ul><ul><li>Support for Semantic Web Services (Service Discovery) </li></ul></ul><ul><ul><li>Data Mediation </li></ul></ul><ul><li>BPEL light </li></ul><ul><ul><li>WSDL-less BPEL </li></ul></ul><ul><ul><li>Is about message exchanges </li></ul></ul><ul><li>BPEL JS/E4X </li></ul><ul><ul><li>Use JavaScript/E4X for variable assignments </li></ul></ul>BPEL Extensions
  20. 20. BPEL Open Source Orchestra
  21. 21. Eclipse BPEL Designer <ul><li>BPEL 2.0 Design Tool … </li></ul><ul><ul><li>… all standard activities are supported </li></ul></ul><ul><ul><li>No full support of extensibility mechanisms </li></ul></ul><ul><ul><li>Partial support of abstract BPEL </li></ul></ul><ul><ul><li>BPEL 2.0 Validator included </li></ul></ul><ul><li>Synchronized graphical & XML modelling mode </li></ul><ul><li>Prototypical graphical process compare </li></ul>
  22. 22. BPELUnit <ul><li>BPELUnit is a test framework </li></ul><ul><ul><li>like JUnit is for Java </li></ul></ul><ul><ul><li> </li></ul></ul><ul><li>Supports BPEL specifics: </li></ul><ul><ul><li>Web service mocking </li></ul></ul><ul><ul><li>Transparent (un-)deployment </li></ul></ul><ul><ul><li>Test Coverage calculation </li></ul></ul><ul><li>Most functionality independent of BPEL Engine </li></ul><ul><li>Front-ends for Eclipse, Ant, and command-line </li></ul>
  23. 23. Testing <ul><li>Testing is the execution of a program with the intend to find defects </li></ul><ul><ul><li>find defects also means: </li></ul></ul><ul><ul><ul><li>systematically </li></ul></ul></ul><ul><ul><ul><li>in a repeatable way </li></ul></ul></ul><ul><ul><li>in our case: automate it! </li></ul></ul><ul><li>Simulation is not Testing </li></ul><ul><ul><li>Testing also includes the application server, JVM, BPEL Engine, Database configuration, ... </li></ul></ul><ul><ul><li>Simulation uses another &quot;target engine&quot; </li></ul></ul>
  24. 24. Test Structure BPEL BPELUnit Real Services deploy <soap> <soap> <soap> <soap> Client Mock A Mock B <soap> undeploy Eclipse Ant Command Line Deployer (optional)
  25. 25. BPEL Execution: Apache ODE <ul><li>BPEL 1.1 and 2.0 supported </li></ul><ul><li>Fast and scalable process engine </li></ul><ul><li>Modular design & embeddable </li></ul><ul><li>3 deployment targets supported </li></ul><ul><ul><li>Web container (Axis2) </li></ul></ul><ul><ul><li>JBI (ServiceMix) </li></ul></ul><ul><ul><li>SCA (Tuscany) </li></ul></ul><ul><li>Implicit Message Correlation </li></ul><ul><li>XPath 1.0 & 2.0, XQuery </li></ul><ul><li>Management and Auditing </li></ul><ul><li>Backed by Intalio & Red Hat </li></ul>
  26. 26. Tammo van Lessen (IAAS, Uni Stuttgart) & Simon Moser (IBM) Demo
  27. 27. Demo schedule <ul><li>Open & Explain Fahrschulservice (v1) </li></ul><ul><li>Run Tests (3 tests) </li></ul><ul><ul><li>Tests are green </li></ul></ul><ul><li>Verbal: New func required, create Testcase </li></ul><ul><li>Open pre-defined new Testcase (testcase 4) </li></ul><ul><li>Run all 4 Tests against v1 </li></ul><ul><ul><li>One test is red </li></ul></ul><ul><li>Verbal: Analyse, find and eliminate problem </li></ul><ul><li>Open & Explain prepared process (v2) </li></ul><ul><ul><li>Show Processes in Process Compare View </li></ul></ul><ul><li>Run tests again against v2 </li></ul><ul><ul><li>Tests are green </li></ul></ul>
  28. 28. Is BPEL dead? <ul><li>Not really! </li></ul><ul><li>BPMN 2.0 is still under development and not as mature as BPEL </li></ul><ul><li>BPMN 2.0 adds even more abstraction and makes it more difficult to bring models to execution </li></ul><ul><li>It‘s a matter of time! </li></ul>
  29. 29. Q&A Thank you for your attention!