Presentation is loading. Please wait.

Presentation is loading. Please wait.

Doing SOA the right way Dheeraj Bhushan ACCO Brands Lincolnshire, IL.

Similar presentations


Presentation on theme: "Doing SOA the right way Dheeraj Bhushan ACCO Brands Lincolnshire, IL."— Presentation transcript:

1 Doing SOA the right way Dheeraj Bhushan ACCO Brands Lincolnshire, IL

2 Agenda Why Service Oriented Architecture Why Service Oriented Architecture SOA Technology SOA Technology SOA Features SOA Features SOA Design Principles SOA Design Principles Oracle SOA Suite Oracle SOA Suite Oracle SOA Components Oracle SOA Components BPEL FeaturesBPEL Features Corporate SOA Initiative Corporate SOA Initiative Designing with SOA Principles and Examples Designing with SOA Principles and Examples

3 Why Service Oriented Architecture? Globalization Globalization Economic Pressures Economic Pressures Business Process Outsourcing Business Process Outsourcing Regulatory Compliance Regulatory Compliance Technology Technology Standards Standards EDIEDI UCC, VICSUCC, VICS UNSPSCUNSPSC …

4 SOA Technology InternetInternet Ubiquitous means of Data and Control Flow Ubiquitous means of Data and Control Flow Web ServicesWeb Services Business Process Execution Language: BPEL Business Process Execution Language: BPEL Enterprise Service Bus: ESB Enterprise Service Bus: ESB Java Web Services or Servlet Java Web Services or Servlet Stateless ServicesStateless Services Stateless Session Beans (Java Beans) Stateless Session Beans (Java Beans) CORBA Objects (IDL) CORBA Objects (IDL) COM objects (COM+,DCOM,.NET) COM objects (COM+,DCOM,.NET)

5 SOA Principles Oracle SOA Suite Features Standardized Service Contract Standardized Service Contract Loose Coupling Loose Coupling Abstraction Abstraction Autonomy Autonomy Discoverability Discoverability

6 SOA Design Principles Reusability Reusability Key design decisions deliver on this PrincipleKey design decisions deliver on this Principle Statelessness Statelessness Design decision of Synchronous or Asynchronous ServiceDesign decision of Synchronous or Asynchronous Service

7 SOA and Oracle SOA Suite Oracle SOA Suite Business Activity Monitoring Web Services Manager Business Rules Engine BPEL Process Manager Enterprise Service Bus WS-* BPEL4WS BPEL 1.1 JSR-94 MOM & Services aggregation SOA represents an architectural model that lies at the heart of the service-oriented computing platform and is supported by the application of the service-orientation design paradigm. SOA is based in Standards such as XML, WSDL, BPEL etc. Web services management and security solution to enforce authentication and authorization policies on services and to monitor services and processes for compliance to SLAs Orchestration engine to tie services into business processes Business rules engine to enable business policies to be captured and automated Multi-protocol enterprise service bus to integrate applications SOA is a form of technology architecture that adheres to the principles of service-orientation. When realized through the Web Services technology platform, SOA establishes the potential to support and promote these principles throughout the business process and automation domains of an enterprise **

8 Oracle SOA Stack Business Process Execution Language (BPEL): orchestration engine to tie services into business processes Business Process Execution Language (BPEL): orchestration engine to tie services into business processes Enterprise Service Bus (ESB ): Multi-protocol enterprise application to integrate application messages. Enterprise Service Bus (ESB ): Multi-protocol enterprise application to integrate application messages. Rules Author: Business rules engine to enable business policies to be captured and automated Rules Author: Business rules engine to enable business policies to be captured and automated Oracle Web Services Manager (OWSM): Web services management and security solution to enforce authentication and authorization policies on services and to monitor services and processes for compliance to SLAs Oracle Web Services Manager (OWSM): Web services management and security solution to enforce authentication and authorization policies on services and to monitor services and processes for compliance to SLAs

9 BPEL Features Web Services/ WSDL as component model Web Services/ WSDL as component model XML as data-model (data loose- coupling) XML as data-model (data loose- coupling) Synchronous and Asynchronous message exchange patterns Synchronous and Asynchronous message exchange patterns Hierarchical exception model Hierarchical exception model Long running unit of work/compensation Long running unit of work/compensation

10 Corporate SOA Initiative Institute Master Data Management (MDM) Institute Master Data Management (MDM) Establish Center of Excellence (CoE) Establish Center of Excellence (CoE) Define Business vocabulary Define Business vocabulary NounsNouns Verbs/ Business ComponentsVerbs/ Business Components Business ServicesBusiness Services Business ProcessesBusiness Processes Build a Plan to answer the questions Build a Plan to answer the questions What technology, whereWhat technology, where

11 SOA Considerations Design and Build using the SOA Principles Design with Loose coupling based on Web ServicesDesign with Loose coupling based on Web Services Focus aggressively on reusabilityFocus aggressively on reusabilityReusability: Dont create a component that will or can not be reused. If a component can not be reused in its current shape. Break it, Merge it or Modify it so that it can be re- used.

12 Designing Reusability Design Web Services Framework Design Web Services Framework New Web ServicesNew Web Services Services at tier 1 provide framework utilities Services at tier 1 provide framework utilities Services at tier 2 are Nouns of the Company vocabulary Services at tier 2 are Nouns of the Company vocabulary Service at tier 3 are components or a Business Process from the company context Service at tier 3 are components or a Business Process from the company context Services at tier 4 or higher are Business Processes from the company offering. Services at tier 4 or higher are Business Processes from the company offering. Convert to Web ServicesConvert to Web Services Service name is a noun for tier 1 Service Service name is a noun for tier 1 Service

13 BPEL Strength Strength ModulesModules DomainsDomains FlowsFlows Web ServicesWeb Services Weakness Weakness Stay as high level in Business Process as possible Avoid Iterate

14 ESB Strength Strength ModulesModules GroupsGroups Web ServicesWeb Services Weakness Weakness Document Size limitation

15 Example: Three Way Integration Questions we decided to answer Questions we decided to answer We must create Reusable ObjectsWe must create Reusable Objects Take a step towards Web Services as a standard for loose coupling applications.Take a step towards Web Services as a standard for loose coupling applications.

16 No Challenge No Reward Some tough choices we made for Reusability. Create BPEL Processes instead of exposing PL/SQL APIs as Web Services. Create BPEL Processes instead of exposing PL/SQL APIs as Web Services. a.We accepted that we can not anticipate all scenarios of future extension so the most flexible vehicle for converting the PL/SQL APIs to a Web Service was chosen; BPEL. b.We also expected to make these endpoints flexible and secure so some rudimentary form of security was built into the process from the beginning.

17 No Challenge No Reward Cont… Created our own XML vocabulary for Intermediate objects, keeping in mind the organizational objective. Created our own XML vocabulary for Intermediate objects, keeping in mind the organizational objective. Our Processes talk to each other on custom XML messages. Most of these are API parameter in XML Schema format, however some are not API calls and these took a whole lot more time to build.Our Processes talk to each other on custom XML messages. Most of these are API parameter in XML Schema format, however some are not API calls and these took a whole lot more time to build. Some reuse of a processes was evident early on; therefore there was extra effort put into building the vocabulary to ensure it reuse is easier, as the reuse is expected in near term.Some reuse of a processes was evident early on; therefore there was extra effort put into building the vocabulary to ensure it reuse is easier, as the reuse is expected in near term.

18 Shipment Confirmation Our target process for using Web Services model was chosen to be the E-Business Suite Shipment confirmation process. Our target process for using Web Services model was chosen to be the E-Business Suite Shipment confirmation process. Here are some of the factors influencing that decision Here are some of the factors influencing that decision The existing process was created to support a legacy application and not our current target application.The existing process was created to support a legacy application and not our current target application. The code was working in batch mode running for a long time to play catch up during peak season. The code was working in batch mode running for a long time to play catch up during peak season. The Code had become cumbersome to maintain and a lot of other changes embedded into this code prohibited solution approaches that needed change to this code.The Code had become cumbersome to maintain and a lot of other changes embedded into this code prohibited solution approaches that needed change to this code.

19 Our To Do List MDM and CoE are management sponsored initiatives so we started on the next Step that the our project could sponsor. Define Business Vocabulary Define Business Vocabulary Define namespaceDefine namespace Define tier 1,2, 3 and 4 componentsDefine tier 1,2, 3 and 4 components Design componentsDesign components Refine DefinitionsRefine Definitions

20 Define Business Vocabulary Define your organizational namespace Define your organizational namespace Define a Component Architecture Define a Component Architecture Nouns should be tier 2 servicesNouns should be tier 2 services URL/BusinessObjects/1.0/NounName URL/BusinessObjects/1.0/NounName Business components or verbs make the tier 3Business components or verbs make the tier 3 URL/ComponentContext/verbNoun | componentname like URL/ComponentContext/verbNoun | componentname like URL/apps/ebsInterface/OrgShipMethod – Get Organization Specific Ship Method (EBS Data element) given a set of carrier and service attributesURL/apps/ebsInterface/OrgShipMethod – Get Organization Specific Ship Method (EBS Data element) given a set of carrier and service attributes Business Processes or tier 4 servicesBusiness Processes or tier 4 services URL/apps/ApplicationContext/ProcessName URL/apps/ApplicationContext/ProcessName URL/apps/ebs/ShipmentConfirmation – Confirms third party warehouse shipments in EBS.URL/apps/ebs/ShipmentConfirmation – Confirms third party warehouse shipments in EBS.

21 Tier 1 Service Example Define your Utility Package Define your Utility Package com.acco.utilscom.acco.utils Design and Build your Utility class/componentDesign and Build your Utility class/component We used a custom dateConversion class by extending IXPathFunction with ESB to get our data formatted. This class is used in XSLT transformationsWe used a custom dateConversion class by extending IXPathFunction with ESB to get our data formatted. This class is used in XSLT transformations

22 Acco dateConversion.java package com.acco.utils; import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; /** import com.oracle.bpel.xml.xpath.IXPathContext; import com.oracle.bpel.xml.xpath.IXPathFunction; import com.oracle.bpel.xml.xpath.XPathFunctionException; */ */ import java.io.IOException; import java.text.DateFormat; import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Date; import java.util.GregorianCalendar; import java.util.List; public class dateConversion { private GregorianCalendar dt; private GregorianCalendar dt; public dateConversion() { this.dt = new GregorianCalendar(); //Defines a Calendar using default timezone and locale this.dt = new GregorianCalendar(); //Defines a Calendar using default timezone and locale } /** /** * This method converts the date in a give format to date as per specified format * This method converts the date in a give format to date as per specified format * Input Output format codes * Input Output format codes * YY - 2 digit year * YY - 2 digit year * CCYY- 2 digit Century followed by 2 digit year * CCYY- 2 digit Century followed by 2 digit year * MM - 2 digit numeric month format * MM - 2 digit numeric month format * DD - 2 digit numeric day of the month format * DD - 2 digit numeric day of the month format * DAY - 3 digit day of the week format * DAY - 3 digit day of the week format * MON - 3 digit month of the year format * MON - 3 digit month of the year format * hh - 2 digits numeric hour * hh - 2 digits numeric hour * mm - 2 digits minute format * mm - 2 digits minute format * ss - 2 digit seconds format * * Output only format codes * Output only format codes * Day - Completely spelled Day of the Week * Day - Completely spelled Day of the Week * Month - Completely spelled Month of the year format * Month - Completely spelled Month of the year format * Year - Completely Spelled Year * Year - Completely Spelled Year * hh - 2 digits numeric hour * hh - 2 digits numeric hour * mm - 2 digits minute format * mm - 2 digits minute format * ss - 2 digit seconds format * ss - 2 digit seconds format * TZD - Timezone designator prefixed by "+" or "-" sign to signify variance from GMT * TZD - Timezone designator prefixed by "+" or "-" sign to signify variance from GMT * inpDate inpDate inpFormat inpFormat */ */ public static String convDCMSToXML(String inpDate,String inpFormat) { Calendar cl = Calendar.getInstance(); Calendar cl = Calendar.getInstance(); String retDate = cl.getTime().toString(); String retDate = cl.getTime().toString(); try { try { // System.out.println("In the ADD Operation"); // System.out.println("In the ADD Operation"); String DATE_FORMAT= inpFormat; String DATE_FORMAT= inpFormat; String xmldateformat = "yyyy-MM- d'T'HH:mm:ss"; String xmldateformat = "yyyy-MM- d'T'HH:mm:ss"; SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); // if ( ((inpDate.length() == 6 ) || inpDate.length() == 8) && (DATE_FORMAT.length() == 3 )) { // if ( ((inpDate.length() == 6 ) || inpDate.length() == 8) && (DATE_FORMAT.length() == 3 )) { inpDate =inpDate.substring(0,2)+"/"+inpDate.substring(2,4)+"/"+inpDate.s ubstring(4); inpDate =inpDate.substring(0,2)+"/"+inpDate.substring(2,4)+"/"+inpDate.s ubstring(4); }

23 Using dateConversion Class exclude-result-prefixes="xsl plt pc ns0 jca imp1 tns hdr ns1 ns2 bpws ehdr hwf xp20 ora ids orcl acco "> --> --> Act Ship Date value sent is Act Ship Date value sent is Acco Date conversion value is Acco Date conversion value is

24 Design Components Define your as is process Define your as is process Define your activities in the as is process Define your activities in the as is process Normalize your activities Normalize your activities Use Testing Driven Development to build BPEL Use Testing Driven Development to build BPEL Convert your Use Cases to test cases for BPELConvert your Use Cases to test cases for BPEL Build your Release 1 BPEL Model based on activities and Use CasesBuild your Release 1 BPEL Model based on activities and Use Cases Test your model against Use CasesTest your model against Use Cases Identify failed Use casesIdentify failed Use cases Fix Model to address failuresFix Model to address failures Retest Model against Use CasesRetest Model against Use Cases

25 Develop Service Contract Design a Web Service Contract Design a Web Service Contract XML SchemaXML Schema WS PolicyWS Policy WSDLWSDL

26 XML Schema: Shipment Request

27 XML Schema: Shipment Response

28 WS Policy: Example

29 WSDL: Examples Synchronous Process with ExceptionsAsynchronous Process Synchronous Process Exceptions

30 ShipmentConfirmation Solution Oracle Shipping Execution APIs Oracle Inventory Interface Table OTM Remote Inquiry Interface Shipment Download Interface and Other Oracle EBS tables

31 Fusion Middleware E-Business Suite Shipment Inquiry Key Orchestrating Process Service endpoint, created from ESB Object Oracle API Wrapper Processes Oracle Interface Wrapper Processes

32 BPEL Tips Name the process as to what it is performing Name the process as to what it is performing Develop Iteratively Develop Iteratively Design with Use Cases Design with Use Cases Develop and Test Comprehensively Develop and Test Comprehensively Agile is a good development model for BPEL. If you have not used it before, it is time now. Agile is a good development model for BPEL. If you have not used it before, it is time now.

33 References Oracle SOA Suite Developer Guide (B ) Oracle SOA Suite Developer Guide (B ) Oracle BPEL Process Manager Developer Guide (B ) Oracle BPEL Process Manager Developer Guide (B ) Oracle Enterprise Service Bus Developer Guide (B ) Oracle Enterprise Service Bus Developer Guide (B ) OASIS Reference Model for Service Oriented Architecture OASIS Reference Model for Service Oriented Architecture OASIS Reference Architecture for Service Oriented Architecture OASIS Reference Architecture for Service Oriented Architecture SOA Practitioners Guide Part 1: Why Services- Oriented Architecture? SOA Practitioners Guide Part 1: Why Services- Oriented Architecture? SOA Practitioners Guide Part 2: SOA Reference Architecture SOA Practitioners Guide Part 2: SOA Reference Architecture

34 Notices ++ Copyright © OASIS® 1993–2008. All Rights Reserved. All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The full Policy may be found at the OASIS website. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to OASIS, except as needed for the purpose of developing any document or deliverable produced by an OASIS Technical Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR Policy, must be followed) or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ** Service-Oriented Architecture concepts, Technology, and Design Thomas Erl


Download ppt "Doing SOA the right way Dheeraj Bhushan ACCO Brands Lincolnshire, IL."

Similar presentations


Ads by Google