Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dheeraj Bhushan ACCO Brands Lincolnshire, IL

Similar presentations

Presentation on theme: "Dheeraj Bhushan ACCO Brands Lincolnshire, IL"— Presentation transcript:

1 Dheeraj Bhushan ACCO Brands Lincolnshire, IL
Doing SOA the right way Dheeraj Bhushan ACCO Brands Lincolnshire, IL Welcome, Thanks for showing interest in this still shiny technology, by which I mean sparingly used. So let me ask this question. What do you expect shown the title of this presentation Thank you all for showing up for this wonderfully controversial topic of SOA technology. I would like to emphasize that although you might received loads of SOA information from several sources, I felt that there might still be confusion looming over. Why am I doing this? Well because I tried to use his direction and was successfully able to implement the idea behind SOA although, the sequence in which it happened made me realize that several industry professionals might not have yet received the true sense of SOA and I thought this might be a means to send some more information out, with a example from a customer site and not a vendor site, now as we all know that definitely helps as it is grounded closely to what average businesses can afford for resource and time as opposed to vendors with their team of specialists. So lets get started on this short introduction to SOA while working it into a live example as how we did SOA at a project at ACCO that is now live and was a positive experience. What I am about to present is not a White Papers, which are generally prepared to provide you a sequence of steps to perform a very specific task with a set objective. As there is no right answer to the “how to do SOA” question, I will not be attempting to answer that here. What we will cover here is a guideline for a set of steps that need to be defined within the context of an organization and/or a project that is trying to leverage SOA or Oracle’s SOA technology implementation. I have been asked “why do web services?” well my first answer is “Good point, maybe you should not”. The reason is Web Services is an esoteric concept if you don’t already live in the realm of Web and know how services operate, developing a web service just to have SOA is probably not the right thing. However the presence of Internet/Intranet assures me that you are living in the Web and the climb might relate to the process of creating services to leverage the Web you live. Well then for those of you who need that answer lets get started …

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

3 Why Service Oriented Architecture?
Globalization Economic Pressures Business Process Outsourcing Regulatory Compliance Technology Standards EDI UCC, VICS UNSPSC Although several people have presented the case for SOA. I am going to do a short run of a case based on what I feel are important and pertinent issues in today. This list presents the issues that impact each and every business in united states from one way or the other, at the same time some of these issues impact businesses across the world. The list presents the Globalization: Business must be agile to survive globalization. When competitor can make the same product for less, a business needs to respond creatively and quickly. IT is rarely given the opportunity to influence expectation and alternatives. Economic Pressures: In the face of dwindling sales companies are trying to achieve growth through mergers and acquisitions. These puts pressure on business and IT organizations to optimize resource usage and generate savings from M&A activities this can be achieved from consolidation of disparate people, processes and systems across the merging entities. Regulatory compliance: Enterprises have to comply with government regulations to stay in business. Regulations such as SOX and FDA require business to submit detailed auditing information of their systems. In some cases legacy systems need to be retrofitted with such capability. Technology: New technology enhances and/or creates capability within an organization. Today’s businesses need to leverage all sources to stay competitive. Using the new technology for creating competitive advantage is always an objective. Standards: There are several standard bodies that define overlapping standards and in some places companies have to follow this for their business while others are self imposed and cause conflict across initiatives in business organizations or projects. Standards such as EDI, UCC - Uniform Code Council, Inc , VICS - Voluntary Industry Commerce Solutions , UNSPSC - United Nations Standard Products and Services Code and the list goes on… All these standards need to be worked into the systems and uniform solutions needs to used to implement the same.

4 SOA Technology Internet Web Services Stateless Services
Ubiquitous means of Data and Control Flow Web Services Business Process Execution Language: BPEL Enterprise Service Bus: ESB Java Web Services or Servlet Stateless Services Stateless Session Beans (Java Beans) CORBA Objects (IDL) COM objects (COM+,DCOM, .NET) Lets look at the technologies that enable a SOA Infrastructure To begin with is the Internet the ubiquitous means of Data and Control Flow. Then there are web services Web Services can be of several types and some are listed here The stateless Services Are session beans from your Web Applications And are the Component Object Model (COM) objects on your everyday PC. CORBA, Java Beans and COM Objects are the technology that enable the Stateless Serives in addition to several others, such as AJAX, PHP so on .. Finally there is loose couling Now that we have seen some technologies that enable a Serive Oriented Architecture, Lets discuss some features that identify features of such a platform

5 SOA Principles Oracle SOA Suite Features
Standardized Service Contract Loose Coupling Abstraction Autonomy Discoverability Standardized Service contract: Services within the same service inventory are in compliance with the same contract design standards. This principle preaches a “contract first” approach to service delivery, whereby contracts are custom-developed (prior to the development of the service logic) according to design standards that apply to all services within a given service inventory. Loose Coupling: Service contracts impose low consumer coupling requirements and are themselves decoupled from their surrounding environment. Abstraction: Service contracts only contain essential information and information about services is limited to what is published in service contracts Autonomy: Services exercise a high level of control over their underlying runtime execution environment. Discoverability: Services are supplemented with communicative meta data by which they can be effectively discovered and interpreted These are some of the Features that are exibited by a SOA Platform, Oracle’s SOA Suite/Fusion Middleware platform provides or enforces these SOA features. However the individual services are still developed by people in the organziation. Therefore in addition to these features that are part of SOA Principles, there are some Design Principles that a development team using Oracle’s SOA Suite needs to understand and apply in modeling the services that they plan to develop.

6 SOA Design Principles Reusability Statelessness
Key design decisions deliver on this Principle Statelessness Design decision of Synchronous or Asynchronous Service Besides the Service Contract Development these are the other key featues that one would need to keep in mind while developing Services Reusability: Services contain and express agnostic logic and can be positioned as reusable enterprise resources. Statelessness: Services minimize resource consumption by deferring the management of state information when necessary Now lets talk about what can you do to implement these principles.

7 SOA and Oracle SOA Suite
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** 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 WS-* BPEL4WS BPEL 1.1 JSR-94 MOM & Services aggregation Oracle SOA Suite Business Activity Monitoring Web Services Manager Business Rules Engine BPEL Process Manager Enterprise Service Bus

8 Oracle SOA Stack 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. 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 BPEL: ESB: Rule Author: Oracle WSM:

9 BPEL Features Web Services/ WSDL as component model
XML as data-model (data loose-coupling) Synchronous and Asynchronous message exchange patterns Hierarchical exception model Long running unit of work/compensation I am presenting here the features of BPEL as this one technology delivers the most SOA principles in one package.

10 Corporate SOA Initiative
Institute Master Data Management (MDM) Establish Center of Excellence (CoE) Define Business vocabulary Nouns Verbs/ Business Components Business Services Business Processes Build a Plan to answer the questions What technology, where Why MDM Master Data Management is an approach to create single canonical model of the company data structure

11 SOA Considerations Design and Build using the SOA Principles
Design with Loose coupling based on Web Services Focus aggressively on reusability Reusability: Don’t 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. From an Application Architects perspective the Questions for a Project can be segregated in to several silos. The questions that SOA can be put to best use for answering are. Systemic Interface Data Transport Real-Time Small Batch (each batch less than 10 MB) Modifying Data Static Modification Conditional Modification Delegated Transformations Direct Transformations * Please note that the underlying questions strictly pertain to Systemic interfaces. It is not really advisable to build SOA for Human Interfaces (i.e. Forms and Reports  Based on any tool or technology) unless the same is being designed/modified as a part of the project, ONLY exception to this rule is if there is an opportunity for reusability based on externalizing the component which will offset the cost of modifying the UI. To put meat in the statements, it is best to ensure that the end objective of a questions answered by SOA closely reflects the statements above or can be constructed by using a combination of above statements. To put it in one solid statement. Whatever constitutes as an “Interface” in most project and not a User-Interface will probably be best developed using SOA technology.

12 Designing Reusability
Design Web Services Framework New Web Services Services at tier 1 provide framework utilities Services at tier 2 are Nouns of the Company vocabulary 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. Convert to Web Services Service name is a noun for tier 1 Service The key to success here is lowest level services are part of your framework and are build into your core application or your services container. Tier 2 service are nouns from your Enterprise vocabulary Create verbNoun or contextNouns as tier 3 services. This implies getShipment or get OtmShipment, getEbsShipment… so on and so forth. The J EE adapter terminology fits into this tier, remember though that technology adapters are actually tier 1 services as they are the utility nouns use to access underlying technology objects. Create MetaComponentNouns or BusinessServices as their four or higher level services Notice though that in converted web services model the tier 1 services are nouns and not framework or utilities. This is for self preservation SOA principals of loose coupling and abstraction i.e. loose coupling does not put the technology dependency into its Services Contract and abstraction preaches hiding service metadata. If converted web services are anything lower, i.e. they are utilities in a framework, then they should not be services and the company should consider building company services container for single refence for these services.

13 BPEL Strength Weakness Modules Domains Flows Web Services
Stay as high level in Business Process as possible Avoid Iterate

14 ESB Strength Weakness Modules Groups Web Services
Document Size limitation

15 Example: Three Way Integration
Questions we decided to answer We must create Reusable Objects Take a step towards Web Services as a standard for loose coupling applications. We must create Reusable Objects, for this and projects in the future. We must start to step towards Web Services as a preferred way for two applications to talk. We decided to do this for existing Oracle APIs by externalizing them as Web Services (WS) and then We decided to expose some of our internal processes as WS to start this transition in custom modules and objects realm.

16 No Challenge No Reward Some tough choices we made for Reusability.
Create BPEL Processes instead of exposing PL/SQL APIs as Web Services. 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. We also expected to make these endpoints flexible and secure so some rudimentary form of security was built into the process from the beginning. The initial design of the process revealed that an ideal process would have to communicate 3 way between our WMS which is an AS/400 based product from Manhattan, TMS Planning which is GLOG/OTM from Oracle and our ERP Oracle’s E-Business Suite application. This made the case of SOA based implementation even more strong as we do not have a strong Middleware product in-house for this purpose

17 No Challenge No Reward Cont…
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. 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. PlannedShipment Object a mashup of Oracle Schemas from Order management and Oracle shippping Exeuction module along with the custom interface tables.

18 Shipment Confirmation
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 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 had become cumbersome to maintain and a lot of other changes embedded into this code prohibited solution approaches that needed change to this code. Additionally Company direction from Senior Management pointing to M&A activity other projects in the pipeline made it pretty evident. That an efficient Shipment confirmation process was the path to our revenue improvement. Therefore although with a lot of fingers crossed we decided to make this change in our second phase of the project.

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 namespace Define tier 1,2, 3 and 4 components Design components Refine Definitions

20 Define Business Vocabulary
Define your organizational namespace Define a Component Architecture Nouns should be tier 2 services URL/BusinessObjects/1.0/NounName Business components or verbs make the tier 3 URL/ComponentContext/verbNoun | componentname like URL/apps/ebsInterface/OrgShipMethod – Get Organization Specific Ship Method (EBS Data element) given a set of carrier and service attributes Business Processes or tier 4 services URL/apps/ApplicationContext/ProcessName URL/apps/ebs/ShipmentConfirmation – Confirms third party warehouse shipments in EBS. Some of you must be wondering that where did no. 1 tier go as I said before that that is part of Framework and utilities. We are using Oracle’s SOA suite here, therefore Oracle’s utilities are our tier 1 services, these include the Adapters for Database and Applications and other such services that we use. If you are however interested, I will show you a tier 1 service that we developed in our site, for testing this model by extending an available interface in the SOA Suite.

21 Tier 1 Service Example Define your Utility Package com.acco.utils
Design 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 transformations

22 Acco
package com.acco.utils; import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; /** import; import; import; */ import; 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; public dateConversion() { 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 * Input Output format codes * YY digit year * CCYY- 2 digit Century followed by 2 digit year * MM - 2 digit numeric month format * DD - 2 digit numeric day of the month format * DAY - 3 digit day of the week format * MON - 3 digit month of the year format * hh - 2 digits numeric hour * mm - 2 digits minute format * ss digit seconds format * * Output only format codes * Day - Completely spelled Day of the Week * Month - Completely spelled Month of the year format * Year - Completely Spelled Year * hh - 2 digits numeric hour * mm - 2 digits minute format * TZD - Timezone designator prefixed by "+" or "-" sign to signify variance from GMT inpDate inpFormat */ public static String convDCMSToXML(String inpDate,String inpFormat) { Calendar cl = Calendar.getInstance(); String retDate = cl.getTime().toString(); try { // System.out.println("In the ADD Operation"); String DATE_FORMAT= inpFormat; String xmldateformat = "yyyy-MM-d'T'HH:mm:ss"; SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); // if ( ((inpDate.length() == 6 ) || inpDate.length() == 8) && (DATE_FORMAT.length() == 3 )) { inpDate =inpDate.substring(0,2)+"/"+inpDate.substring(2,4)+"/"+inpDate.substring(4); }

23 Using dateConversion Class
<xsl:stylesheet version="1.0" xmlns:ns1="" xmlns:bpws="" xmlns:plt="" xmlns:pc="" xmlns:ehdr="" xmlns:ns0="" xmlns:jca="" xmlns:hwf="" xmlns:imp1="" xmlns:xp20="" xmlns:tns="" xmlns:xsl="" xmlns:ora="" xmlns:ids="" xmlns:orcl="" xmlns:ns2="" xmlns:hdr="" xmlns:acco="" exclude-result-prefixes="xsl plt pc ns0 jca imp1 tns hdr ns1 ns2 bpws ehdr hwf xp20 ora ids orcl acco"> <xsl:template match="/"> <!-- <xsl:key match="/imp1:Shipments/imp1:DETAIL_CARD1/imp1:ORDER_ID" name="DetailOrderId" use="" /> --> <ns2:Shipments> <ns2:Shipment> <ns2:BATCH_NUMBER> <xsl:choose> <xsl:when test="/imp1:Shipments/imp1:HEADER_CARD1/imp1:BATCH_NUMBER"> <xsl:value-of select="/imp1:Shipments/imp1:HEADER_CARD1/imp1:BATCH_NUMBER"/> </xsl:when> <xsl:when test="/imp1:Shipments/imp1:ISOHEADER_CARD1/imp1:BATCH_NUMBER"> <xsl:value-of select="/imp1:Shipments/imp1:ISOHEADER_CARD1/imp1:BATCH_NUMBER"/> </xsl:choose> </ns2:BATCH_NUMBER> <xsl:for-each select="/imp1:Shipments/imp1:HEADER_CARD1/imp1:ORDER_ID"> <ns2:HEADER> <xsl:comment> Act Ship Date value sent is <xsl:value-of select="$ActShipDate"/> </xsl:comment> Acco Date conversion value is <xsl:value-of select="acco:convDCMSToXML(string($ActShipDate),'Mdy')"/> </xsl:comment>

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

25 Develop Service Contract
Design a Web Service Contract XML Schema WS Policy WSDL Designing a Service Contract relies on successfully executing the following steps. These three steps are the pillars that Web Services stand on and have a deep reaching impact on you whole SOA implementation. With every iteration of these steps for each service you build you put restrictions and definitions in place that define your SOA Landscape. These three steps alone will define how successful the remainder of the SOA implementation could go. XML Schema: Defining a Canonical model for the interaction with a Web Service is the first and foremost step in its design. The model constrains the content that can be send to the service or received from the service. WS Policy: This is the definition of what WS-* standards will be used in the Services framework that will be build. WSDL: The Web Services Definition Language is the contract that associated the XML Schema the WS Policy with an Interaction protocol. WSDL defines what actions the Web Service support and what data elements need to be provided to receive/initiate those services.

26 XML Schema: Shipment Request

27 XML Schema: Shipment Response

28 WS Policy: Example

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

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

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

32 BPEL Tips Name the process as to what it is performing
Develop Iteratively Design with Use Cases Develop and Test Comprehensively 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 (B28764-01)
Oracle BPEL Process Manager Developer Guide (B ) Oracle Enterprise Service Bus Developer Guide (B ) OASIS Reference Model for Service Oriented Architecture OASIS Reference Architecture for Service Oriented Architecture SOA Practitioner’s Guide Part 1: Why Services-Oriented Architecture? SOA Practitioner’s 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 "Dheeraj Bhushan ACCO Brands Lincolnshire, IL"

Similar presentations

Ads by Google