Soa & Bpel


Published on

Published in: Technology, Business
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Soa & Bpel

  1. 1. SOA & BPEL: Building a Service With BPEL and the Java EE Platform
  2. 2. Agenda <ul><li>This session describes how </li></ul><ul><li>developers using Java™ Platform, </li></ul><ul><li>Enterprise Edition can create </li></ul><ul><li>composite applications using BPEL </li></ul><ul><li>with current Java EE tools and </li></ul><ul><li>application servers that support Java </li></ul><ul><li>Business Integration </li></ul>
  3. 3. Agenda <ul><li>Why Services </li></ul><ul><li>Why Composite Applications </li></ul><ul><li>BPEL in the Mix </li></ul><ul><li>A Java EE Based Composite Application </li></ul><ul><li>Summary </li></ul>
  4. 4. Why Services? <ul><li>SOA = an architectural principle for structuring systems that </li></ul><ul><li>SOA emphasizes the de-coupling of system components </li></ul><ul><li>New services are created from existing ones in a synergistic fashion </li></ul><ul><li>Strong service definitions are critical </li></ul><ul><li>Services can be subsequently re-composed in response to changing business requirements </li></ul>
  5. 5. What Are Services? <ul><li>A function accessed using XML message exchange </li></ul><ul><li>Message exchanges have well known exchange patterns </li></ul><ul><li>Services are self-describing, usingmetadata (WSDL) </li></ul>
  6. 6. What Does a Service Do? <ul><li>Transform data </li></ul><ul><li>Route messages </li></ul><ul><li>Query databases </li></ul><ul><li>Orchestrate conversations </li></ul><ul><li>Apply business logic </li></ul><ul><li>Apply business policy </li></ul><ul><li>Handle business exceptions </li></ul><ul><li>Solicit approvals </li></ul><ul><li>… </li></ul>
  7. 7. How Is a Service Implemented? <ul><li>• XSLT </li></ul><ul><li>• Enterprise JavaBeans™ (EJB™) technology </li></ul><ul><li>• BPEL </li></ul><ul><li>• SQL </li></ul><ul><li>• XQuery </li></ul><ul><li>• Routing table </li></ul><ul><li>• Business rules </li></ul><ul><li>• EDI transform </li></ul><ul><li>• … </li></ul>
  8. 8. Service Oriented Architecture <ul><li>In April 2006 the Object Management Group's ( OMG ) SOA Special Interest Group adopted the following definition for SOA </li></ul><ul><li> Service Oriented Architecture is an architectural style for a Community of providers and consumers of services to achieve mutual value, that </li></ul><ul><ul><li>Allows participants in the communities to work together with minimal co-dependence or technology dependence </li></ul></ul><ul><ul><li>Specifies the contracts to which organizations, people and technologies must adhere in order to participate in the community </li></ul></ul><ul><ul><li>Provides for business value and business processes to be realized by the community </li></ul></ul><ul><ul><li>Allows for a variety of technologies to be used to facilitate interactions within the community </li></ul></ul>
  9. 9. Service Oriented Architecture <ul><li>In March 2006 the OASIS group SOA Reference Model released its first public review draft. </li></ul><ul><li>This defines the basic principles of SOA that apply at all levels of a service architecture, from business vision through to technical and infrastructure implementation </li></ul><ul><ul><li>Service Oriented Architecture; a paradigm for organizing and utilizing distributed capabilities that may be under the control of different ownership domains. </li></ul></ul><ul><ul><li>It provides a uniform means to offer, discover, interact with and use capabilities to produce desired effects consistent with measurable preconditions and expectations </li></ul></ul>
  10. 10. Principles of SOA <ul><li>Services share a formal contract </li></ul><ul><li>Services are loosely coupled </li></ul><ul><li>Services abstract underlying logic </li></ul><ul><li>Services are composable </li></ul><ul><li>Services are reusable </li></ul><ul><li>Services are autonomous </li></ul><ul><li>Services are stateless </li></ul><ul><li>Services are discoverable </li></ul>
  11. 11. Benefits of SOA <ul><li>Flexible (Agile) IT </li></ul><ul><ul><li>Adaptable to changing business needs </li></ul></ul><ul><li>Faster time to market </li></ul><ul><ul><li>Reuse existing code, minimize new development </li></ul></ul><ul><li>Business and process-driven </li></ul><ul><ul><li>New business opportunities </li></ul></ul><ul><li>Greater ROI </li></ul><ul><ul><li>Leverage existing IT asset </li></ul></ul>
  12. 12. Composite Applications <ul><li>Composite applications are... applications ! </li></ul><ul><li>Comprised of heterogeneous parts </li></ul><ul><ul><li>Some existing parts </li></ul></ul><ul><ul><li>Some new parts </li></ul></ul><ul><li>Composite applications != SOA </li></ul><ul><li>Composite applications employ SOA principles </li></ul><ul><ul><li>Features exposed as Web services </li></ul></ul><ul><ul><li>Standards-based interaction between services </li></ul></ul><ul><ul><li>Described by standards-based artifacts </li></ul></ul><ul><ul><li>Are themselves composable </li></ul></ul>
  13. 13. Purchase Service
  14. 15. Purchase Service Functions
  15. 16. Composite Applications—Summary <ul><li>A composite application is a collection of existing and independently developed applications and new business logic, orchestrated together into a brand new solution of a business problem that none alone can solve </li></ul><ul><li>Such an application looks to the user like a regular new interactive application, yet in reality it may be only 10 percent new and 90 percent an assembly of pre-existing components or data; </li></ul><ul><li>The “glue” that brings a composite application together is integration technology </li></ul>
  16. 17. WS-BPEL Works With WSDL Web Services Business Process Execution Language <ul><li>Web services are described in WSDL </li></ul><ul><ul><li>Operations are message exchanges </li></ul></ul><ul><ul><li>Each operation represents an individual unit of action </li></ul></ul><ul><li>We need a way to orchestrate these operations with multiple web services in the right order to perform a Business process </li></ul><ul><ul><li>Sequencing, conditional behavior etc. </li></ul></ul><ul><li>BPEL provides standard-based orchestration of these operations </li></ul>
  17. 18. What is BPEL? <ul><li>XML-based language used to specify business processes based on Web Services </li></ul><ul><li>BPEL processes describe </li></ul><ul><ul><li>Long running, stateful, transactional, conversations between two or more partner web services </li></ul></ul><ul><li>BPEL is key to implementing SOA Big Rules </li></ul><ul><ul><li>Conversational </li></ul></ul><ul><ul><li>Mostly Async </li></ul></ul><ul><ul><li>XML Document-based </li></ul></ul><ul><ul><li>Orchestrated </li></ul></ul>
  18. 19. BPEL Is a Web Service Sequencing Language <ul><li>Process defines “conversation” flow chart </li></ul><ul><ul><li>Conversation consists of only WSDL-described message exchanges </li></ul></ul><ul><ul><li>BPEL provides and consumes WSDL defined services </li></ul></ul><ul><li>Process instance is a particular conversation following the chart </li></ul><ul><ul><li>Execution systems can support multiple concurrent conversations </li></ul></ul>
  19. 20. BPEL “Fixes” WSDL <ul><li>WSDL: unordered set of operations </li></ul><ul><ul><li>Operations are message exchanges </li></ul></ul><ul><li>• Need rules for ordering </li></ul><ul><li>• Support for sequencing </li></ul><ul><li>• Support for concurrency </li></ul><ul><li>• Choreography with external entities </li></ul>
  20. 21. Orchestration vs. Choreography <ul><li>Orchestration </li></ul><ul><ul><li>An executable business process describing a flow from the perspective and under control of a single endpoint (commonly: Workflow) </li></ul></ul><ul><ul><li>BPEL handles Orchestration </li></ul></ul><ul><li>Choreography (WSDL) </li></ul><ul><ul><li>The observable public exchange of messages, rules of interaction and agreements between two or more business process endpoints </li></ul></ul><ul><ul><li>WSDL handles Choreography </li></ul></ul>
  21. 22. BPEL: Relationship to Partners
  22. 23. Business Process Needs To... <ul><li>Co-ordinate asynchronous communication between services </li></ul><ul><li>Correlate message exchanges between parties </li></ul><ul><li>Implement parallel processing of activities </li></ul><ul><li>Implement compensation logic(Undo operations) </li></ul><ul><li>Manipulate/transform data between partner interactions </li></ul><ul><li>Support for long running business transactions and activities </li></ul><ul><li>Handle exception handling </li></ul><ul><li>Need for universal data model for message exchange </li></ul>
  23. 24. BPEL Document Structure
  24. 25. BPEL Activities <ul><li>Basic Activities </li></ul><ul><li>• <invoke> </li></ul><ul><li>• <receive> </li></ul><ul><li>• <reply> </li></ul><ul><li>• <assign> </li></ul><ul><li>• <throw> </li></ul><ul><li>• <wait> </li></ul><ul><li>• <empty> </li></ul><ul><li>Structured Activities </li></ul><ul><li>• <sequence> </li></ul><ul><li>• <while> </li></ul><ul><li>• <pick> </li></ul><ul><li>• <flow> </li></ul><ul><li>• <scope> </li></ul><ul><li>• <compensate> </li></ul><ul><li>• <switch> </li></ul><ul><li>• <link> </li></ul>
  25. 26. BPEL: Basic Activities <ul><li><invoke> </li></ul><ul><ul><li>To invoke a one-way or request/response operation on a portType offered by a partner </li></ul></ul><ul><li><receive> </li></ul><ul><ul><li>To do a blocking wait for a matching message to arrive </li></ul></ul><ul><ul><li>Can be the instantiator of the business process </li></ul></ul><ul><li><reply> </li></ul><ul><ul><li>To send a message in reply to a message that was received through a <receive> </li></ul></ul><ul><ul><li>The combination of a <receive> and a <reply> forms a request-response operation on the WSDL portType for the process </li></ul></ul>
  26. 27. BPEL: Basic Activities <ul><li><assign> </li></ul><ul><ul><li>Can be used to update the values of variables with new data </li></ul></ul><ul><li><throw> </li></ul><ul><ul><li>Generates a fault from inside the business process </li></ul></ul><ul><li><wait> </li></ul><ul><ul><li>Allows you to wait for a given time period or until a certain time has passed </li></ul></ul><ul><li><empty> </li></ul><ul><ul><li>Allows you to insert a &quot;no-op&quot; instruction into a business process </li></ul></ul><ul><ul><li>This is useful for synchronization of concurrent activities, for instance </li></ul></ul>
  27. 28. BPEL: Structured Activities <ul><li>• <sequence> </li></ul><ul><ul><li>Perform activities in sequential order </li></ul></ul><ul><li>• <flow> </li></ul><ul><ul><li>Perform activities in parallel </li></ul></ul><ul><li>• <switch> </li></ul><ul><ul><li>Conditional choice of activities </li></ul></ul><ul><li>• <scope> </li></ul><ul><ul><li>Enclose multiple activities in a single scope </li></ul></ul>
  28. 29. Example Business Process
  29. 30. Sample Activities in BPEL
  30. 31. BPEL: Relationship to Partners
  31. 32. Why Do You Care on BPEL? <ul><li>• In SOA-enabled environment, you are more likely to </li></ul><ul><li>build an application by orchestration various services </li></ul><ul><li>via BPEL </li></ul><ul><li>• You will probably use BPEL design tool to create a </li></ul><ul><li>BPEL document </li></ul><ul><li>• The BPEL document is then executed by BPEL </li></ul><ul><li>engine </li></ul><ul><ul><li>Highly likely in JBI enabled platform </li></ul></ul>
  32. 33. Example Scenario The Loan Processing Composite Application
  33. 35. WSDL: Schema Types (1) LoanProcessor.wsdl
  34. 36. WSDL: Schema Types (1) LoanProcessor.wsdl
  35. 38. BPEL Header
  36. 39. BPEL: Partner Links & Variables
  37. 40. BPEL: Partner Links & Variables
  38. 41. BPEL: …the Decision
  39. 42. BPEL: …the Decision, Reply
  40. 43. Loan Processor Service (EJB 3)
  41. 44. What Are the Artifacts?
  42. 45. Service Consumption (Java APIs) for XML Web Services (JAX-WS 2.0)
  43. 46. Runtime: Java EE Platform and Java Business Integration <ul><li>Java Business Integration serves as messaging infrastructure </li></ul><ul><ul><li>Java EE web services interact through Java Business Integration </li></ul></ul><ul><ul><li>Java Business Integration bindings allow remote consumers and providers </li></ul></ul><ul><ul><li>Add other service technologies as Java Business Integration components </li></ul></ul><ul><li>Transparent to programmer using Java EE technology </li></ul><ul><ul><li>Reuse without re-coding </li></ul></ul>
  44. 47. Java Business Integration (JSR 208)
  45. 49. Web Service Orchestration <ul><li>Author, design, deploy and test business processes with the BPEL Designer </li></ul><ul><ul><li>Supports the BPEL 2.0 constructs </li></ul></ul><ul><ul><li>Adds powerful methods for visual authoring </li></ul></ul><ul><ul><li>Step through debugging support </li></ul></ul><ul><ul><li>Built in testing capability for unit testing </li></ul></ul><ul><li>BPEL Mapper for BPEL variable assignments </li></ul><ul><ul><li>Quickly generate XPath expressions </li></ul></ul><ul><li>Deploy to the built in BPEL engine </li></ul><ul><ul><li>Running as a service engine in the JBI environment within the provided Sun Java System Application Server </li></ul></ul>
  46. 50. Summary <ul><li>SOA enables flexible and agile enterprise application architecture </li></ul><ul><li>Services can be created and used using a variety of Java EE technologies </li></ul><ul><li>BPEL is a service orchestration language for creating stateful composite applications </li></ul><ul><li>Services can be re-implemented using other technologies as long as service interface is preserved without changing consumers </li></ul><ul><li>Java Business Integration is the enabling infrastructure </li></ul>
  47. 51. Questions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.