Title: Using BPEL with ESB for Loose Coupling of Business Process

Similar documents
Departamento de Engenharia Informática. Systems Integration. SOA Adapters Tutorial. 1. Open SQL*Plus in order to run SQL commands.

BPEL Orchestration. 4.1 Introduction. Page 1 of 31

Oracle SOA Suite 10g: Services Orchestration

Departamento de Engenharia Informática. Systems Integration. Web Services and BPEL Tutorial

Tutorial 6 : Receiving Siebel Integration Object through the Oracle AS Adapter

Enterprise Integration

Oracle BPEL Tutorial

Oracle SOA Suite 11g: Build Composite Applications

3 Connecting to Applications

Tutorial 2 : Invoking a CICS transaction through the Oracle AS Adapter

edocs Home > BEA AquaLogic Service Bus 3.0 Documentation > Accessing ALDSP Data Services Through ALSB

Oracle Java CAPS HTTP Binding Component Tutorial

Oracle Developer Day

Oracle SOA Suite 11g: Build Composite Applications

Receiving PeopleSoft Message (PeopleTools 8.17) through the Oracle AS PeopleSoft Adapter. An Oracle White Paper September 2008

ebusiness Suite goes SOA

Oracle SOA Suite 12c: Build Composite Applications

Tutorial 8 : Oracle Apps BES Organization Insert Event Publish To Siebel Cust Acct Insert

Oracle Fusion Middleware

Chapter 2 Introduction

Oracle Exam 1z0-478 Oracle SOA Suite 11g Certified Implementation Specialist Version: 7.4 [ Total Questions: 75 ]

BPEL FOR WORKFLOW DEVELOPERS Jerry Ireland, Rightsizing Inc

Oracle SOA Suite 12c : Build Composite Applications

Oracle Fusion Middleware

Enterprise Integration

Create Rank Transformation in Informatica with example

Tutorial 5 : Invoking Siebel Business Object through the Oracle AS Adapter

Oracle SOA Suite 12c: Build Composite Applications. About this course. Course type Essentials. Duration 5 Days

4 Connecting to Composites

Managing Your Database Using Oracle SQL Developer

H. Adding BAM Activity Sensors

Service-Oriented Architecture (SOA)

Oracle Cloud. Using Oracle Eloqua Adapter Release E

<Insert Picture Here> Click to edit Master title style

Oracle Cloud Using the Microsoft SQL Server Adapter with Oracle Autonomous Integration Cloud

Introduction to IBM Data Studio, Part 1: Get started with IBM Data Studio, Version and Eclipse

Introduction to IBM Data Studio, Part 1: Get started with IBM Data Studio, Version and Eclipse

Organizing Your Network with Netvibes 2009

OPEN ESB 2.3 TUTORIAL. HTTP BC to BC, No BPEL

Oracle SOA Dynamic Service Call Framework By Kathiravan Udayakumar

Oracle Enterprise Repository

SOA Suite for healthcare integration Series

Integration Framework. Architecture

Using ILOG JRules in WebSphere Integration Developer

Building Database-Centric Web Applications Using. Oracle HTML DB

Oracle BPEL Process Manager Demonstration

OpenESB Standalone Edition V3.0 Hello World

D Fault Handling. Note: The solution for this chapter can be found in c:\po\solutions\apd

1 Getting Started with Oracle Service Bus

Java CAPS Creating a Simple Web Service from a JCD

Oracle Cloud Using Oracle E-Business Suite Adapter Endpoint Configuration Wizard. Release 17.3

Step By Step Procedure to Implement Soap to JDBC Scenario

Lab 2: Setting up secure access

Setup Real-Time Integration Business Insight using a native installation For AstraTeq Help Desk Tutorial

We recommend you review this before taking an ActiveVOS course or before you use ActiveVOS Designer.

Real Application Security Administration

Using the BPEL Designer and Service Engine

8 Adding Fulfillment. 8.1 Introduction. Section 8.1 Adding Fulfillment 8-1

ActiveBPEL Fundamentals

Oracle SOA Suite 11. Hands-On Workshop VM Intro / Demo / Deployment

Using SQL Developer. Oracle University and Egabi Solutions use only

Integrating JD Edwards Enterprise One and Oracle Service Bus

Oracle Service Bus. 10g Release 3 (10.3) October 2008

Oracle Cloud Using the DB2 Adapter with Oracle Integration

Oracle Cloud Using the Microsoft SQL Server Adapter with Oracle Integration Cloud

HL7 v2.3.1 A19 Query Processor

Web service design. every Web service can be associated with:

Policy Manager for IBM WebSphere DataPower 7.2: Configuration Guide

HP Service Test Management

Oracle Cloud. Using the Oracle Mapper Release 16.4 E

CA SiteMinder Web Services Security

What's New in ActiveVOS 7.1 Includes ActiveVOS 7.1.1

In this lab, you will build and execute a simple message flow. A message flow is like a program but is developed using a visual paradigm.

Oracle Cloud Using the DB2 Adapter. Release 17.4

Oracle Cloud Using the Oracle Responsys Adapter. Release 17.3

Building E-Business Suite Interfaces using BPEL. Asif Hussain Innowave Technology

B. By not making any configuration changes because, by default, the adapter reads input files in ascending order of their lastmodifiedtime.

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Creating a PDF Report with Multiple Queries

Bridging the Gap. Peter Ebell AMIS

Oracle Cloud Using the Microsoft SQL Server Adapter. Release 17.3

Oracle Cloud Using the Oracle Advanced Queuing (AQ) Adapter. Release 17.3

Oracle Cloud Using the Trello Adapter. Release 17.3

Lab 1 - Getting started with OIM 11g

Tutorial 9 : MQSeries Queue integration through the Oracle AS Adapter for JMS

IS L02-MIGRATING TO SEP 12.1

SOA Software Policy Manager Agent v6.1 for WebSphere Application Server Installation Guide

Apps Exception Problem Building Schema Jdeveloper

Oracle Cloud Using the Oracle Messaging Cloud Service Adapter. Release 17.3

WebSphere Lab Jam Connectivity WebSphere Message Broker. Lab Exercises

Oracle EXAM - 1Z Oracle Application Integration Architecture 11g Essentials. Buy Full Product.

Oracle Cloud Using the Microsoft Adapter. Release 17.3

BizFlow Introduction Course. Exercise Guide

Oracle Cloud Using the Google Calendar Adapter with Oracle Integration

Oracle Fusion Middleware. Using Ariba Adapter Release 12c ( ) E

Just Get It Written: Deploying Applications to WebLogic Server Using JDeveloper and WLS Console Hands on Practice

Design Xml Schema For The Given Company Database

Oracle Web Service Manager 11g Component Level Role Authorization (in SOA Suite) March, 2012

X100 ARCHITECTURE REFERENCES:

: ESB Implementation Profile

Transcription:

Title: Using BPEL with ESB for Loose Coupling of Business Process Version: 1.0, Date: June 26, 2008 Discussion Topics Objective Application Architecture Deployed ESB Architecture Creating Database Tables and Sequence Creating Employee BPEL Process Creating Employee System in ESB (File Adapters) Enhancing ESB to have Database Adapter Register and Test Employee ESB Enhancing Employee BPEL Service to Invoke ESB Test BPEL Process Summary Objective The Objective of this exercise is to Create a Loose Coupled Business Process and an ESB Service, Use Case: The Employee Business Process would receive Employee Name, Employee Type, Basic Salary, HRA from the End User (or any other invoking service), based on this data the process would generate Employee Id, calculate Tax and Net take home Salary The Employee ESB would be responsible for Writing the data to File Using File Adapter if the employee is of type Probation OR Writes the data into Employee and Finance Tables if the employee is of type Permanent The Employee Business Process would invoke Employee ESB to Accomplish the task. Takeaway: The System Answers and shows in Practice Loose Coupling Service Oriented Architecture Concepts How BPEL Processes can be invoked by ESB How ESB can be invoked by a BPEL Process How File and DB Adapters can be used How to set Routing Rules in ESB How to Map incoming and outgoing data through ESB Mappers How Loose Coupling can be established across various Services Respect the Architectural Concepts of Loose Coupling between Business Layer, Service Layer and Data Layer.

Application Architecture The Above Figure shows End User / Any other business Process Invoking an Employee Business Process, The Process would do some Business Logic and in-turn invokes ESB as a Partner Link, In this case ESB acts as a service Provider. ESB is Connected DB and File Adapters. Based on Routing Rules Defined in ESB the XML data received from Employee BPEL Process is sent to DB and File Adapters. The Adapters would write into Appropriate tables or xml file system. Software s: The Entire Architecture uses Oracle 10 g SOA Suite for BPEL and ESB, Oracle XE Database for storing data into tables, JDeveloper 10.1.3.3 release is used as an IDE to Write, Build, Deploy and Test BPEL and ESB Developments. Layering: In Architecture BPEL Process forms to Business Layer (which could also have Oracle Rule Author), The Service Layer is ESB which connects various Adapter Services, Its easier to change routing rules or transformations in this layer based on new rules governing Application Integration, The Last layer which holds data in the form of XML files or in the form of tables is Data Layer.

Deployed ESB Architecture The Above Deployed ESB Diagram shows Employee BPEL Process invoking Employee ESB, This has 3 Adapters connected with routing rules, Employee File Adapter to write into XML File, HR Data Adapter to write into HR table, Finance Data Adapter to write into Finance table, We would also need XSL Mappers to transform data from incoming Employee Process XSD to outgoing HR Data Table XSD; also we need one more Mapper for Finance Adapter as well. Creating Database Tables and Sequence We will install Oracle XE Database, you can use Oracle SQLDeveloper to do SQL Operations on the database or use Oracle XE Database Homepage after installing the software 1. HRData (Table), cols EMPID varchar2(10), EMPNAME varchar2(100), EMPTYPE varchar2(100) for storing HR related data 2. FinanceData (Table), cols EMPID varchar2(10), BASIC number, HRA number, tax number, takehome number for storing Finance related data 3. CREATE SEQUENCE EMPSEQ MINVALUE 1 INCREMENT BY 1 ; Note: In real life production scenarios HR data and Finance data could reside in separate database in multiple tables or even use xml or file formats to hold data Creating Employee BPEL Process We Start of by creating an EmployeeApp having BPEL Process project named EmpProcess using Jdeveloper. We start of by Modifying the Generated

EmpProcess.xsd which would be deciding on input and output variables to the Business Process. I have chosen Employee Name, Employee Type (Probation or Permanent), Basic Salary, HRA Salary as inputs, where as the business process would calculate my Tax Payable, and net take home salary. For us to Generate Employee Id, we would need a sequence number for this we can drag and drop Database Adapter into Service area of BPEL process, give the name as GetSeqNo click next

Its assumed that you have already created a database connection from Jdeveloper into XE Database, I am using the name as soa. If not yet use connection navigator of Jdeveloper to establish the db connection

we would need to execute Custom SQL to get the next sequence number responsible for generating employee id

Give the SQL as select empseq.nextval from dual. Jdeveloper Auto generates the XSD File which can be previewed. Click Finish

The generated Partner Link is shown above.

We would need an invoke activity dragged between receive input and reply output name it as InvokeSeqNo which would be connected to GetSeqNo partner link

Lets save the BPEL Process. And create a New ESB Application. Ignore the above Complete BPEL Process for sometime as we need to create an ESB which can be invoked using BPEL Creating Employee System in ESB Create another new Application named EmployeeESBApp, create a new Project EmpESBProj of type ESB Project. what and why? : We will now create a File Adapter to write the incoming employee data into file, incase the employee type is PROB (Probation). the data would come from Employee BPEL and will be passed into Employee ESB. In the EmpESBProj.esb start with creating a File Adapter as shown below

Give the name as EmpFileAdapter click Next,

Select Write File, Operation Name as Write, Click Next

Select the Output directory as c:\temp and file name as emp_%seq%.xml, for every record a new xml file will be created.

we want the XML File to be of type EmpProcess.xsd which can be Browsed from the file repository from our Employee BPEL Process Project. We will need the Schema Element of type Response because we want to display the output of a BPEL Process rather than request.

Click Finish Button. Enhancing ESB to Add DB Adapter (HR Table) what and why? : Employee data of type PERM (Permanent) would be written to HR table using DB Adapter connected to ESB. The employee type would be passed on from Employee BPEL Process into Employee ESB through a Partner Link. Create a Database Adapter from Create Adapter Service in EmpESBProj.esb

canvas. Give the Name as HRDataAdapter click Next

Select soa connection, click Next

Select Perform an Operation on a Table Radio button and select Insert Only check box, click next button.

Import the HRData Table, click next button.

Click Finish Button. Enhancing ESB to Add DB Adapter (Finance Table)

what and why? : Employee data of type PERM (Permanent) would be written to Finance table using DB Adapter connected to ESB. The employee type would be passed on from Employee BPEL Process into Employee ESB through a Partner Link.

The Wizard is similar to HR Table one except that we need to select FinanceData table from the Import Tables button.

On the ESB canvass we can now see 3 adapters,

Lets create on create system/group icon at extreme top left and create a system EMPLOYEE click OK Lets create a Routing Service to connect these adapters together. what and why? : Routing Service plays very important role in the design of ESB one can say it s the Heart of ESB, its here that we define routing rules to connect to various adapters, map (or Transform) incoming data to out going data through Mappers, In our use case, the employee data of type PROB would be written into xml file, the employee data of type PERM would be written into 2 tables through 2 adapters one for HR and other for Finance.

We create a new Routing Service by name EmpRoutingService in the EMPLOYEE System Routing Rules can be added by clicking on + symbol next to Routing Rules in Routing Service, By clicking on funnel / filter icon routing conditions can be set up.

We will then set up a Routing condition where emptype = PROB the data goes into file adapter is connected to Employee ESB We define one more Routing Rule and set one more Routing condition to send data into HR database Adapter. We would need a New Mapper File to Map data incoming from Employee Business Process into HR File Adapter. So a new xsl transformation file is created.

Connect the 2 wsdl elements as shown in the above figure. Similarly Routing rules are created for emptype = PERM by clicking on the funnel icon.

New Transformation file is created to map incoming Employee BPEL Process schema into outgoing Finance Data table.

The Completed ESB looks as shown in the above figure. Register and Test Employee ESB Once and ESB Project is created and can compile without any errors its time to Register the ESB

Right click on the Employee ESB Project and select Register with ESB and select the SOA Server Connection. If Oracle SOA Suite is installed on port 8888, then ESB console can be opened at the

following URL http://localhost:8888/esb Clicking on Definition Tab will show the links to WSDL URL and SOAP Endpoint URI one can test the ESB at this stage itself. In our case we will test the application end to end after completing our BPEL Process.

Enhancing Employee BPEL Service to Invoke ESB what and why? : From our BPEL Process we will calculate Tax Payable, Net take home salary based on user input, then invoke ESB to write the data into XML File or Database Table, based on business rules Drag and Drop a Partner Link, on to the Employee BPEL Process Project s BPEL Canvas, name it as EmpESBLink, for the wsdl select from Registered ESB Services, select EmpRoutingService under EMPLOYEE

Drag and Drop Invoke Activity above reply output, which invokes this partner link, and name it as InvokeEmpESB. Drag and Drop Assign Activity above InvokeEmpESB to assign variables into the partner link ( Employee ESB ). Name this Assign as AssignEmpData The completed BPEL Process now looks as shown below. Create Copy a Operations in the Assign Activity. 1. Employee Id is Concatination of EmpSeq.next val and employee type, which is assignment of type expression.

2. Employee Name, Employee Type, Basic Salary, HRA are directly mapped from inputvariable payload into InvokeEmpESB input variable.

4. Tax is calculated as 20% the sum of basic + hra using expression type of assignment.

5. Take home salary is calculated as basic sal + hra tax amount once again expression type variable is used to get this done, that s it save the BPEL process.

Deploy and Test BPEL Process Lets build and deploy the BPEL Process into Oracle 10g SOA Suite. Access the BPEL Console at the following URL http://localhost:8888/bpelconsole Invoke the Employee BPEL Process, input data ( Employee Name, Type, Basic, HRA), click on POST XML Message. Since the employee is of type PERM, the employee data is written into database tables HR and Finance

Using SQL Developer one can view the HRData & FinanceData table for the new record entered, you can observe that emp id is auto generated and so is tax and take home salary.

One can view the XML in Flow tab

Also at ESB Console based on the same instance id shared with BPEL console one can also view the ESB diagram how data flow has happened from Employee BPEL Process into HR Data Adapter and Finance Data Adapter marked in green.

Similarly one more test case can be created in BPEL Console where employee is of type PROB this would generate XML File in c:\temp directory

The above fig shows the XML Flow for the BPEL testcase.

Based on instance id one can view the green boxes in the ESB diagram where data has flown from Employee BPEL Process into Employee File Adapter. Summary The above use case and practice session shows how the following can be achieved Loose Coupling Service Oriented Architecture Concepts How BPEL Processes can be invoked by ESB How ESB can be invoked by a BPEL Process How File and DB Adapters can be used How to set Routing Rules in ESB How to Map incoming and outgoing data through ESB Mappers How Loose Coupling can be established across various Services Respect the Architectural Concepts of Loose Coupling between Business Layer, Service Layer and Data Layer Author James Smith Java Oracle Blogs