Top Banner
Doing SOA the right Doing SOA the right way way Dheeraj Bhushan Dheeraj Bhushan ACCO Brands ACCO Brands Lincolnshire, IL Lincolnshire, IL
31
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Doing SOA the right way Dheeraj Bhushan ACCO Brands Lincolnshire, IL.

Doing SOA the right wayDoing SOA the right way

Dheeraj BhushanDheeraj Bhushan

ACCO BrandsACCO Brands

Lincolnshire, ILLincolnshire, IL

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

AgendaAgenda Why Service Oriented ArchitectureWhy Service Oriented Architecture SOA TechnologySOA Technology SOA FeaturesSOA Features SOA Design PrinciplesSOA Design Principles Oracle SOA SuiteOracle SOA Suite Oracle SOA ComponentsOracle SOA Components

• BPEL FeaturesBPEL Features Corporate SOA InitiativeCorporate SOA Initiative Designing with SOA Principles and Designing with SOA Principles and

ExamplesExamples

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

Why Why Service Oriented Architecture?Service Oriented Architecture?

GlobalizationGlobalization Economic PressuresEconomic Pressures Business Process OutsourcingBusiness Process Outsourcing Regulatory ComplianceRegulatory Compliance TechnologyTechnology StandardsStandards

• EDIEDI• UCC, VICSUCC, VICS• UNSPSCUNSPSC• ……

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

SOA TechnologySOA Technology

• InternetInternet Ubiquitous means of Data and Control FlowUbiquitous means of Data and Control Flow

• Web ServicesWeb Services Business Process Execution Language: BPELBusiness Process Execution Language: BPEL Enterprise Service Bus: ESB Enterprise Service Bus: ESB Java Web Services or ServletJava 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)

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

SOA Principles SOA Principles Oracle SOA Suite FeaturesOracle SOA Suite Features

Standardized Service Contract Standardized Service Contract Loose CouplingLoose Coupling AbstractionAbstraction AutonomyAutonomy DiscoverabilityDiscoverability

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

SOA Design PrinciplesSOA Design Principles

ReusabilityReusability• Key design decisions deliver on this Key design decisions deliver on this

PrinciplePrinciple StatelessnessStatelessness

• Design decision of Synchronous or Design decision of Synchronous or Asynchronous ServiceAsynchronous Service

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

SOA and Oracle SOA SuiteSOA and Oracle SOA Suite

Oracle SOA SuiteOracle SOA Suite

Business Activity Monitoring

Web Services Manager

Business Rules Engine

BPEL Process Manager

Enterprise Service Bus

WS-*

BPEL4WSBPEL 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**

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

Oracle SOA StackOracle SOA Stack Business Process Execution Language Business Process Execution Language

(BPEL):(BPEL): orchestration engine to tie services into orchestration engine to tie services into business processesbusiness processes

Enterprise Service Bus (ESBEnterprise Service Bus (ESB): Multi-protocol ): Multi-protocol enterprise application to integrate application enterprise application to integrate application messages.messages.

Rules Author: Rules Author: Business rules engine to enable Business rules engine to enable business policies to be captured and automatedbusiness policies to be captured and automated

Oracle Web Services Manager (OWSM): Oracle Web Services Manager (OWSM): Web services management and security solution Web services management and security solution to enforce authentication and authorization to enforce authentication and authorization policies on services and to monitor services and policies on services and to monitor services and processes for compliance to SLAsprocesses for compliance to SLAs

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

BPEL FeaturesBPEL Features

Web Services/ WSDL as component Web Services/ WSDL as component modelmodel

XML as data-model (data loose-XML as data-model (data loose-coupling)coupling)

Synchronous and Asynchronous Synchronous and Asynchronous message exchange patternsmessage exchange patterns

Hierarchical exception modelHierarchical exception model Long running unit of Long running unit of

work/compensationwork/compensation

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

Corporate SOA InitiativeCorporate SOA Initiative

Institute Master Data Management (MDM)Institute Master Data Management (MDM) Establish Center of Excellence (CoE)Establish Center of Excellence (CoE) Define Business vocabularyDefine Business vocabulary

• NounsNouns• Verbs/ Business ComponentsVerbs/ Business Components• Business ServicesBusiness Services• Business ProcessesBusiness Processes

Build a Plan to answer the questionsBuild a Plan to answer the questions• What technology, whereWhat technology, where

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

SOA ConsiderationsSOA Considerations

Design and Build using the SOA PrinciplesDesign and Build using the SOA Principles• Design with Loose coupling based on Web Design with Loose coupling based on Web

ServicesServices• Focus aggressively on reusabilityFocus aggressively on reusability

Reusability: Reusability:

Don’t create a component that will or can Don’t create a component that will or can not be reused. If a component can not be not be reused. If a component can not be reused in its current shape. Break it, Merge reused in its current shape. Break it, Merge it or Modify it so that it can be re-used.it or Modify it so that it can be re-used.

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

Designing ReusabilityDesigning Reusability

Design Web Services FrameworkDesign 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 Services at tier 2 are Nouns of the Company

vocabularyvocabulary Service at tier 3 are components or a Service at tier 3 are components or a

Business Process from the company contextBusiness Process from the company context Services at tier 4 or higher are Business Services at tier 4 or higher are Business

Processes from the company offering.Processes from the company offering.

• Convert to Web ServicesConvert to Web Services Service name is a noun for tier 1 ServiceService name is a noun for tier 1 Service

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

BPELBPEL

StrengthStrength• ModulesModules• DomainsDomains• FlowsFlows• Web ServicesWeb Services

WeaknessWeakness• Stay as high level in Stay as high level in

Business Process as Business Process as possiblepossible

• Avoid IterateAvoid Iterate

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

ESBESB

StrengthStrength• ModulesModules• GroupsGroups• Web ServicesWeb Services

WeaknessWeakness• Document Size Document Size

limitationlimitation

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

Example: Three Way IntegrationExample: Three Way Integration

Questions we decided to answerQuestions we decided to answer• We must create Reusable ObjectsWe must create Reusable Objects• Take a step towards Web Services as a Take a step towards Web Services as a

standard for loose coupling applications. standard for loose coupling applications.

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

No Challenge No RewardNo Challenge No Reward

Some tough choices we made for Some tough choices we made for Reusability.Reusability.

Create BPEL Processes instead of Create BPEL Processes instead of exposing PL/SQL APIs as Web Services.exposing PL/SQL APIs as Web Services.

a.a. We accepted that we can not anticipate all We accepted that we can not anticipate all scenarios of future extension so the most scenarios of future extension so the most flexible vehicle for converting the PL/SQL APIs flexible vehicle for converting the PL/SQL APIs to a Web Service was chosen; BPEL.to a Web Service was chosen; BPEL.

b.b. We also expected to make these endpoints We also expected to make these endpoints flexible and secure so some rudimentary form flexible and secure so some rudimentary form of security was built into the process from the of security was built into the process from the beginning.beginning.

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

No Challenge No Reward Cont…No Challenge No Reward Cont…

Created our own XML vocabulary for Created our own XML vocabulary for Intermediate objects, keeping in mind the Intermediate objects, keeping in mind the organizational objective.organizational objective.• Our Processes talk to each other on custom Our Processes talk to each other on custom

XML messages. Most of these are API XML messages. Most of these are API parameter in XML Schema format, however parameter in XML Schema format, however some are not API calls and these took a whole some are not API calls and these took a whole lot more time to build.lot more time to build.

• Some reuse of a processes was evident early Some reuse of a processes was evident early on; therefore there was extra effort put into on; therefore there was extra effort put into building the vocabulary to ensure it reuse is building the vocabulary to ensure it reuse is easier, as the reuse is expected in near term.easier, as the reuse is expected in near term.

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

Shipment ConfirmationShipment Confirmation Our target process for using Web Services model Our target process for using Web Services model

was chosen to be the E-Business Suite Shipment was chosen to be the E-Business Suite Shipment confirmation process. confirmation process.

Here are some of the factors influencing that Here are some of the factors influencing that decisiondecision• The existing process was created to support a legacy The existing process was created to support a legacy

application and not our current target application.application and not our current target application.• The code was working in batch mode running for a long The code was working in batch mode running for a long

time to play catch up during peak season.time to play catch up during peak season.• The Code had become cumbersome to maintain and a The Code had become cumbersome to maintain and a

lot of other changes embedded into this code prohibited lot of other changes embedded into this code prohibited solution approaches that needed change to this code.solution approaches that needed change to this code.

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

Our To Do ListOur To Do List

MDM and CoE are management MDM and CoE are management sponsored initiatives so we started sponsored initiatives so we started on the next Step that the our project on the next Step that the our project could sponsor.could sponsor.

Define Business VocabularyDefine Business Vocabulary• Define namespaceDefine namespace• Define tier 1,2, 3 and 4 components Define tier 1,2, 3 and 4 components • Design componentsDesign components• Refine DefinitionsRefine Definitions

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

Define Business VocabularyDefine Business Vocabulary Define your organizational namespaceDefine your organizational namespace

• http://xmlns.acco.com/ Define a Component ArchitectureDefine a Component Architecture

• Nouns should be tier 2 servicesNouns should be tier 2 services URL/BusinessObjects/1.0/NounNameURL/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 URL/apps/ebsInterface/OrgShipMethod – Get Organization Specific Ship Method (EBS Data element) given a set of carrier Specific Ship Method (EBS Data element) given a set of carrier and service attributesand service attributes

• Business Processes or tier 4 servicesBusiness Processes or tier 4 services URL/apps/ApplicationContext/ProcessNameURL/apps/ApplicationContext/ProcessName

• URL/apps/ebs/ShipmentConfirmation – Confirms third party URL/apps/ebs/ShipmentConfirmation – Confirms third party warehouse shipments in EBS.warehouse shipments in EBS.

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

Design ComponentsDesign Components Define your as is processDefine your as is process Define your activities in the as is processDefine your activities in the as is process Normalize your activitiesNormalize your activities Use Testing Driven Development to build BPELUse 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 Build your Release 1 BPEL Model based on activities and

Use CasesUse 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

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

Develop Service ContractDevelop Service Contract

Design a Web Service ContractDesign a Web Service Contract• XML SchemaXML Schema• WS PolicyWS Policy• WSDLWSDL

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

XML Schema: Shipment RequestXML Schema: Shipment Request

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

XML Schema: Shipment ResponseXML Schema: Shipment Response

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

WS Policy: ExampleWS Policy: Example

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

WSDL: ExamplesWSDL: ExamplesSynchronous Process with Exceptions Asynchronous Process

Synchronous Process Exceptions

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

ShipmentConfirmation SolutionShipmentConfirmation Solution

BPEL Process Manager

ShipmentConfirmation

PKMSShipments

Delivery

DeliveryDetail

FreightCosts

-generate *-recieve *

-calls

*

-CRUD

*

-Calls

*

-CRUD

*

-calls

*

-CRUD

*

PlannedShipment

-inquiry *-send *

E-Business Suite

OTM-Application Server

WSH_DELIVERIES_PUB

WSH_DELIVERY_DETAILS_PUB

WSH_FREIGHT_COSTS_PUBXXAB_SHIPCONFIRM_TABLES

ONT_TABLES

WSH_TABLES

-saveShipment

*

-storeShipment

*

RIQServlet

-SendInquiry*

-ReturnShipment

*

WMServlet

-sendShipment

*

-UpdateShipment*

TripStop

OrderHold

MaterialTransaction

MTL_TRANSACTIONS_INTERFACE

-Calls* -CRUD

*-Invoke*

-Execute

*

-Invoke

*

-Execute

*

Oracle Shipping Execution APIs

Oracle Inventory Interface Table

OTM Remote Inquiry Interface

Shipment Download Interface and Other Oracle EBS tables

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

Fusion MiddlewareFusion Middleware

BPEL Process Manager

ShipmentConfirmation

PKMSShipments

Delivery

DeliveryDetail

FreightCosts

-generate *-recieve *

-calls

*

-CRUD

*

-Calls

*

-CRUD

*

-calls

*

-CRUD

*

PlannedShipment

-inquiry *-send *

TripStop

OrderHold

MaterialTransaction

-Calls* -CRUD

*-Invoke*

-Execute

*

-Invoke

*

-Execute

*

E-Business Suite Shipment Inquiry

Key Orchestrating Process

Service endpoint, created from ESB Object

Oracle API Wrapper Processes

Oracle Interface Wrapper Processes

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

BPEL TipsBPEL Tips

Name the process as to what it is Name the process as to what it is performingperforming

Develop Iteratively Develop Iteratively Design with Use Cases Design with Use Cases Develop and Test ComprehensivelyDevelop and Test Comprehensively Agile is a good development model Agile is a good development model

for BPEL. If you have not used it for BPEL. If you have not used it before, it is time now.before, it is time now.

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

ReferencesReferences Oracle SOA Suite Developer Guide (B28764-01)Oracle SOA Suite Developer Guide (B28764-01) Oracle BPEL Process Manager Developer Guide Oracle BPEL Process Manager Developer Guide

(B28981-02) (B28981-02) Oracle Enterprise Service Bus Developer Guide Oracle Enterprise Service Bus Developer Guide

(B28211-01)(B28211-01) OASIS Reference Model for Service Oriented OASIS Reference Model for Service Oriented

Architecture 1.0 Architecture 1.0 ++++

OASIS Reference Architecture for Service Oriented OASIS Reference Architecture for Service Oriented Architecture 1.0 Architecture 1.0 ++++

SOA Practitioner’s Guide Part 1: Why Services-SOA Practitioner’s Guide Part 1: Why Services-Oriented Architecture?Oriented Architecture?

SOA Practitioner’s Guide Part 2: SOA Reference SOA Practitioner’s Guide Part 2: SOA Reference ArchitectureArchitecture

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

NoticesNotices++++Copyright © OASIS® 1993–2008. All Rights Reserved. Copyright © OASIS® 1993–2008. All Rights Reserved. All capitalized terms in the following text have the meanings assigned to them in the OASIS 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 Intellectual Property Rights Policy (the "OASIS IPR Policy"). The full Policy may be found at the OASIS website. website. This document and translations of it may be copied and furnished to others, and derivative works 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, 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 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. 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 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 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 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 copyrights, as set forth in the OASIS IPR Policy, must be followed) or as required to translate it into languages other than English. languages other than English. The limited permissions granted above are perpetual and will not be revoked by OASIS or its The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns. successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and OASIS 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 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 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 RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. PURPOSE.

** ** Service-Oriented Architecture concepts, Technology, and Design Thomas Service-Oriented Architecture concepts, Technology, and Design Thomas ErlErl