Integrating Oracle E-Business Suite through the …public.dhe.ibm.com/software/dw/wes/1001_chang/1001_chang...Open Interface and Concurrent Program using WebSphere® Adapter for Oracle
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
Integrating Oracle E-Business Suite through theOracle Open Interface and Concurrent Programusing WebSphere AdaptersSkill Level: Intermediate
This article describes how to integrate Oracle® E-Business Suite R12 through OracleOpen Interface and Concurrent Program using WebSphere® Adapter for OracleE-Business Suite V7.0. It then provides a detailed development, configuration, andtest process of one business scenario that creates an Oracle invoice into the OracleE-Business Suite Account Payables module.
Introduction
WebSphere Adapter for Oracle E-Business Suite (hereafter called Oracle EBSAdapter), as an important product of the IBM® WebSphere Adapter family, providesfirst class integration with Oracle E-Business Suite (hereafter called Oracle EBS). Itcan help you integrate existing Oracle EBS system resources into service-orientedarchitecture (SOA) business solutions.
Oracle E-Business Suite is a new generation Enterprise Resource Planning (ERP)that has great deal of users in the worldwide ERP market. To enable externalinteraction, Oracle EBS exposes several kinds of interface types, such as OracleOpen interface, Concurrent Program, Java™ Service, XML Gateway, PL/SQL API,and so on. Therefore, to integrate with Oracle EBS through these interfaces is a big
This article illustrates how to integrate Oracle EBS with WebSphere Process Serverthrough Oracle Open Interface and Concurrent Program using WebSphere Adapterfor Oracle E-Business Suite.
WebSphere Adapter
WebSphere Adapters implement the Java EE Connector Architecture (JCA) andEnterprise MetaData Discovery specifications to provide a perfect and quickintegration experience with graphical discovery tools without resorting to writingcode. It delivers generic technology and business application adapters with wizardsthat quickly and easily service enable legacy applications, ERP, HR, CRM, andsupply chain systems.
WebSphere Adapters build up the communication bridge between the enterpriseapplications (like SAP®, Siebel®, Oracle e-Business Suite, and so on) andWebSphere platform (Figure 1). It also enables the WebSphere platform with thecapability to access the external data sources through various technologies, such asJDBC, e-mail, FTP, and so on.
Figure 1. WebSphere Adapter family overview
WebSphere Adapter for Oracle E-Business Suite provides inbound and outboundbi-directional interaction with Oracle EBS.
Inbound
Inbound processing enables an application to receive notification when objects inOracle EBS system are changed. The change causes a trigger, or a business event,to update the event store with information about the change. Periodically, theadapter polls the event store, retrieves, and processes events, and then deliversthem to the export component of a module that is part of an application that runs inWebSphere Process Server or WebSphere Enterprise Service Bus. Figure 2 shows
Outbound processing enables an application to access or modify data in Oracle EBSsystem. An application running in WebSphere Process Server or WebSphereEnterprise Service Bus invokes a service in an outbound module, which sends arequest to the adapter to process one or more business objects. The adapterconnects to Oracle EBS system, inserts the data into Oracle Interface Tables, andexecutes the specific Oracle Concurrent Program that validates and applies the datainto Oracle Base Tables. Figure 3 shows the outbound processing.
Figure 3. Processing outbound request
Oracle E-Business Suite and Oracle Open Interface/Concurrent Program
Oracle E-Business Suite is a comprehensive suite of integration and global businessmanagement. It mainly applies to the Financial, Retail, Telco, Insurance andManufacture fields. Besides the enterprise resource management ability, it alsoexposes some public interface types such as Oracle Open interface, ConcurrentProgram, Java Service, XML Gateway, PL/SQL API, and e-Commerce gateway.Oracle Open interface and Concurrent Program are the most popular interfacetypes.
Oracle Interface Table is used to store data from external sources. A concurrentprogram runs as a concurrent process and is executed by the Concurrent Manager.The Concurrent program validates the data in Oracle Interface Table and thenapplies it into the Oracle Base Table. This mechanism ensures the data integrity andconsistency in Oracle EBS system.
Interaction between WebSphere Adapter for Oracle E-Business Suite V7.0 andOracle E-Business Suite R12
This article will introduce the mechanism and practice of integrating Oracle EBSthrough Oracle Open Interface and Concurrent Program using WebSphere Adapterfor Oracle EBS. In Figure 4, it shows the outbound direction interaction. The Oracleinvoice data can be first inserted into Account Payables (hereafter called AP)Interface Tables, and then moved to Account Payables Base Tables after validation.
The main steps of the process are:
1. Define a stored procedure that wraps the invoice import ConcurrentProgram. This article will introduce why and how to define such kinds ofstored procedures.
2. Run the Oracle EBS Adapter EMD process to discover the AP InterfaceTables and the predefined stored procedure. This will generate theadapter outbound module.
3. Deploy the module on WebSphere Process Server.
4. During the Oracle EBS Adapter outbound runtime, the invoice data isinserted into the AP Interface Tables, and then the predefined storedprocedure is invoked automatically to execute the specific ConcurrentProgram to validate and apply the invoice data into the AP Base Tables.Now, the invoice data becomes effective in the Oracle EBS system.
5. The invoice data can be queried through the Oracle EBS administrationconsole.
Figure 4. Interaction scenario between Oracle EBS Adapter and Oracle EBS
Develop and test the invoice entry into Account Payables
Scenario overview
In this section, we will provide the detailed development, configuration, and testprocess of one business scenario that enters the invoice data into the OracleE-Business Suite Account Payables module.
Create stored procedure that wraps the Oracle ConcurrentProgram
In general, after the data inserted into the Oracle Interface Tables, the businessspecific Concurrent Program should be invoked to validate and apply the input datainto Oracle Base Tables. Before running the Concurrent Program, it needs toinitialize the system parameters. When running the Concurrent Program, it needs toprovide the specific parameters based on what business module will be accessed.We can wrap all these actions into one store procedure.
Oracle EBS Adapter can run such stored procedure as an in-place operationAfterCreateSP, which means the stored procedure will be called automatically afterthe data is created into the Oracle Interface Tables.
Listing 1 is the SQL script is the stored procedure that wraps all related actions toinvoke the business specific Concurrent Program. We created a stored procedurenamed IMPORT_AP_INVOICE into the APPS schema of the Oracle EBS systemusing the account of apps. This stored procedure completes two parts.
First, execute FND_GLOBAL.APPS_INITIALIZE to initialize the system parametersApplication User ID, Responsibility ID and Application ID. A different ConcurrentProgram requires different values for these three parameters. Second, executeFND_REQUEST.SUBMIT_REQUEST to invoke the specific Concurrent Programwith the corresponding runtime parameters. A different Concurrent Program requiresdifferent parameter list and parameter values, which totally depend on the businessmodule to access.
Listing 1. Create stored procedure
CREATE OR REPLACE PROCEDURE APPS.IMPORT_AP_INVOICE(source IN VARCHAR2)ISv_request_id NUMBER;BEGIN
APPS.FND_GLOBAL.APPS_INITIALIZE(1318, -- Application User ID (OPERATIONS)50554, -- Responsibility ID (Inventory, Vision
Operations (USA))200 -- Application ID (SQLAP)
);
v_request_id := APPS.FND_REQUEST.SUBMIT_REQUEST('SQLAP', -- Applicaiton Short Name'APXIIMPT', -- Concurrent Program Short Name'Payables Open Interface Import', -- Description of the
Service wizard by selecting File-> New –> External Service.
3. In the Available Types tree view, select Adapters -> Oracle E-BusinessSuite, and then click Next.
4. Select the IBM WebSphere Adapter for Oracle E-Business Suite (IBM:7.0.0.0) node, and then click Next.
5. In the “Import a RAR File” window, keep the default settings, and thenclick Next.
6. Browse and add the Oracle JDBC driver ojdbc6.jar in the “Locate theRequired Files and Libraries” window, and then click Next.
7. In the “Select the Processing Direction” window, click Outbound, andthen click Next.
8. In the “Specify the Discovery Properties” window, select your databaseversion and fill in the necessary connection and authentication information(Figure 5), and then click Next.Figure 5. Configuring the Oracle EBS connection information
node and click the Add icon (>) to select the object to be imported, asshown in Figure 6.Figure 6. Selecting the Oracle EBS data object
11. In the “Specify the Configuration Properties forAP_INVOICES_INTERFACE” window, configure the primary key, storedprocedure AfterCreateSP (IMPORT_AP_INVOICE) and its parameter,and then click OK, as shown in Figure 7.Figure 7. Configuring Oracle Interface Table:AP_INVOICES_INTERFACE
12. As in Steps 10 and 11, select the tableAP_INVOICE_LINES_INTERFACE and configure the primary key, parenttable, and foreign key. Select the Parent object owns child object(cascade) check box and Preserves AP_INVOICE_LINES_INTERFACEwhen the parent is updated check box, and then click OK, as shown inFigure 8.Figure 8. Configuring Oracle Interface Table:AP_INVOICE_LINES_INTERFACE
13. Through the above steps, two interface tables,AP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE,are selected (Figure 9). Click Next.Figure 9. Two selected Oracle interface tables
14. In the “Specify Composite Properties” window, only the Create operationremains. Leave the default values for the other fields, and then click Next.
15. In the “Specify the Service Generation and Deployment Properties”window, do the following (Figure 10):
a. Check Using security properties from the managed connectionfactory.
b. Clear the Join global transaction check box.
c. In the “Deploy connector project” field, select With module for useby single application.
d. In the “Database connection information” field, select Specify localdatabase connection information.
e. Click Next.Figure 10. Configuring service generation and deploymentproperties
Next, you will test the generated module CreateAPInvoice:
1. Start WebSphere Process Server V7.0 in WebSphere IntegrationDeveloper.
2. Deploy the module CreateAPInvoice on to WebSphere Process Server.
3. Start the test client and fill in the sample test data as shown in Table 1and Table 2. The test data can also be found in the provided downloadfiles.
Table 1. Sample data for Table AP_INVOICES_INTERFACEAttribute Value Notes
invoice_id 216410 Unique identifier for thisinvoice
invoice_num cp-1000 The number must beunique for the supplier
invoice_type_lookup_code STANDARD Type of invoice (can beSTANDARD, CREDIT orPREPAYMENT)
invoice_date 2009-12-14 Date of the invoice. Usedate format ofyyyy-mm-dd
vendor_name AccessMicron Supplier name
vendor_site_code IRELAND Supplier pay site code
invoice_amount 63 Invoice amount
invoice_currency_code USD Currency of invoice
terms_name 45 Net (terms date + 45) Payment terms identifier
description INVOICES FROMAccessMicron
Invoice description
source MANUAL INVOICEENTRY
Source of the invoices
org_id 204 Unique internal identifierof the Operating Unit towhich the invoice is to beimported
vendor_email_address [email protected] Supplier e-mail addressfor XML invoicerejections
Table 2. Sample data for Table AP_INVOICE_LINES_INTERFACEAttribute Value Notes
In the development and test sections, we used WebSphere Adapter for OracleE-Business Suite to create an invoice in Oracle Account Payables (AP) modulethrough Open Interface and Concurrent Program. The adapter first inserts theinvoice data in to Oracle nterface table AP_INVOICES_INTERFACE andAP_INVOICE_LINES_INTERFACE, and then the Adapter invokes the storedprocedure IMPORT_AP_INVOICE to execute the Concurrent Program APXIIMPT tovalidate and apply data from the interface tables to the base tables. Finally, querythe imported invoice from the Oracle EBS administration console.
The key points to complete this scenario successfully are as follows:
1. The stored procedure that wraps all related actions to invoke businessspecific Concurrent Program was defined correctly. The stored procedurecontains two parts:
• FND_GLOBAL.APPS_INITIALIZE to initialize the system parameters.
• FND_REQUEST.SUBMIT_REQUEST to invoke the specificConcurrent Program with the corresponding parameters.
All the parameter values should be provided correctly according to thespecific Concurrent Program.
2. The Adapter generated the correct business objects, service definition,and configuration files. When running the External Service wizard inWebSphere Integration Developer, the interface tables and storedprocedure should be configured correctly, including the primary key,foreign key, parent-child relationship, and the in-place operationAfterCreateSP.
3. The invoice data was inserted into the interface tables successfully. Theimported invoice data should be well defined so that it can be inserted intothe interface tables. That means the invoice data inserted into severalinterface tables should be consistent and valid.
4. The Concurrent Program was executed successfully. With the configuredstored procedure, the specific Concurrent Program will be executedautomatically. The Concurrent Program can be executed successfullywhen providing the appropriate parameter values.
In this article, we introduced the mechanism to integrate Oracle E-Business SuiteR12 through Oracle Open Interface and Concurrent Program by using WebSphereAdapter for Oracle E-Business Suite V7.0. The article described a detaileddevelopment, configuration, and test process of one business scenario that createsan Oracle invoice into the Oracle E-Business Suite Account Payables module.
• IBM WebSphere Business Process Management V7.0 Information Center
• IBM Redbook: WebSphere Adapter Development
• IBM WebSphere Adapters product page
• IBM WebSphere Integration Developer product page
• developerWorks WebSphere Process Server and WebSphere IntegrationDeveloper resource page
• Oracle Applications Documentation
About the authors
Pei ChangPei Chang is a Software Engineer at the IBM China Software Development Lab. Shehas many years of experience in WebSphere Adapter development and alsoexperience in WebSphere Process Server, WebSphere Integration Developer, andOracle E-Business Suite integration.
Kai ZhangKai Zhang is a Software Engineer at the IBM China Software development and hasgreat interest in Information Retrieve, SOA, and Web 2.0.