|Oracle Fusion Middleware Adapter for Oracle Applications User's Guide|
11g Release 1 (11.1.1)
Part Number E10537-02
This chapter covers the following topics:
Oracle e-Commerce Gateway provides a common, standards-based approach for Electronic Data Interchange (EDI) integration between Oracle Applications and third party applications. EDI is the computer to computer exchange of business documents in a standard format. The EDI format is commonly used for e-commerce transactions between businesses.
Oracle e-Commerce Gateway is the EDI integration enabler for Oracle Applications. It provides a single integration framework for you to conduct e-business using EDI standards with everyone in your global supply chain. Oracle e-Commerce Gateway provides an application integration infrastructure that is flexible enough to accommodate the integration requirements of any and all applications that must integrate with Oracle Applications. This allows for seamless flow of information in an ever expanding trading partner base.
Oracle e-Commerce Gateway includes pre-built transactions of key business documents that can be implemented simply by defining a trading partner and enabling the transaction in test or production mode. You can implement a single transaction, a group of transactions, or a business flow. You can implement the pre-built transactions as is or configure them to meet your specific industry needs.
Oracle e-Commerce Gateway uses a metadata driven approach to dynamically generate outbound and consume inbound flat files based on user defined trading partner, mapping, transformation, and data validation rules. You can change a rule by changing the metadata stored in the repository. The updated rule takes effect at run-time without any code modifications.
Note: For detailed information about Oracle e-Commerce Gateway, see Oracle e-Commerce Gateway User's Guide. This guide is a part of the Oracle Applications documentation library. Oracle Applications documentation can be accessed from the following link:
Adapter for Oracle Applications can be configured to use e-Commerce Gateway to interact with third party applications. e-Commerce Gateway, like XML Gateway, is primarily used for Business-to-Business (B2B) integration. While XML transactions are mostly based on a single transaction and are event based, EDI transactions are more batch oriented.
Adapter for Oracle Applications is deployed using the BPEL Process Manager (PM) in Oracle JDeveloper. The BPEL PM creates the WSDL interfaces for the e-Commerce Gateway.
This section describes configuring the Adapter for Oracle Applications to use e-Commerce Gateway. It describes the tasks required to configure Adapter for Oracle Applications using the Adapter Configuration Wizard in Oracle JDeveloper.
BPEL Process Scenario
This example uses IN: Ship Notice/Manifest (ECASNI) EDI concurrent program exposed as a Web service to support the inbound Ship Notice/Manifest transaction.
When a shipment request is received, the shipping details will be retrieved and then imported to the Purchasing system to create an electronic shipment notice as a pre-receipt.
If the BPEL process is successfully executed after deployment, you should be able to validate if the shipment notice has been inserted in Oracle Applications with the same shipment identifier number.
Prerequisites to Configure e-Commerce Gateway
Populating Application Context Header Variables
You need to populate certain variables in the BPEL PM in order to provide context information for Oracle Applications. The context information is required for an EDI transaction in order for an Oracle Applications user that has sufficient privileges to run the program.
The context is set taking into account the values passed for the header properties including Username, Responsibility, Responsibility Application, Security Group, and NLS Language. If the values for the new header properties Responsibility Application, Security Group, and NLS Language are not passed, context information will be determined based on Username and Responsibility.
The default Username is SYSADMIN, the default Responsibility is SYSTEM ADMINISTRATOR, the default Security Group Key is Standard, and the default NLS Language is US.
You can change the default values specified in the generated WSDL. This is a static way of changing the context information. These values would apply to all invocations of the deployed business process. However, if you need to provide different context information for different invocations of the business process, then you can dynamically populate the header values. The context information can be specified by configuring an Invoke activity.
For more information about applications context, see Supporting for Normalized Message Properties.
Based on the scenario described earlier, the following design-time tasks are discussed in this chapter.
Create a new BPEL project
Add a partner link
Add a partner link for File Adapter
Configure the Invoke activities
Configure the Assign activity
The first configuration task is to create a new BPEL project.
To create a new BPEL project
Launch Oracle JDeveloper.
Click New Application in the Application Navigator.
The Create SOA Application - Name your application page is displayed.
The Create SOA Application - Name your application Page
Enter an appropriate name for the application in the Application Name field and select SOA Application from the Application Template list.
Click Next. The Create SOA Application - Name your project page is displayed.
Enter an appropriate name for the project in the Project Name field. For example, InsertShipNotice.
The Create SOA Application - Name your project Page
In the Project Technologies tab, ensure that SOA is selected from the Available technology list to the Selected technology list.
Click Next. The Create SOA Application - Configure SOA settings page is displayed.
The Create SOA Application - Configure SOA settings Page
Select Composite With BPEL from the Composite Template list, and then click Finish. You have created a new application, and an SOA project. This automatically creates an SOA composite.
The Create BPEL Process page is displayed.
The Create BPEL Process Page
Enter an appropriate name for the BEPL process in the Name field. For example, InsertShipNotice.
Select Asynchronous BPEL Process in the Template field. Click OK.
An asynchronous BPEL process is created with the Receive and Reply activities. The required source files including bpel and wsdl, using the name you specified (for example, InsertShipNotice.bpel and InsertShipNotice.wsdl) and composite.xml are also generated.
New BPEL Process
The next task is to add a partner link to the BPEL process. A partner link defines the link name, type, and the role of the BPEL process that interacts with the partner service.
Based on the BPEL process scenario, you need to create a partner link to create a ship notice.
To add a partner link
Click BPEL Services in the Component palette.
Drag and drop Oracle Applications from the BPEL Services list into the right Partner Link swim lane of the process diagram. The Adapter Configuration Wizard Welcome page appears. Click Next.
Enter a service name in the Service Name field. For example, InsertShipment.
Click Next. The Service Connection page appears.
Specifying a Database Service Connection
You can perform either one of the following options for your database connection:
Note: You need to connect to the database where Oracle Applications is running.
You can create a new database connection by clicking the Create a New Database Connection icon.
How to define a new database connection, see Create a New Database Connection.
You can select an existing database connection that you have configured earlier from the Connection drop-down list.
The Service Connection page will be displayed with the selected connection information. The JNDI (Java Naming and Directory Interface) name corresponding to the database connection appears automatically in the Database Server JNDI Name field. Alternatively, you can specify a JNDI name.
Note: When you specify a JNDI name, the deployment descriptor of the Oracle Applications adapter must associate this JNDI name with configuration properties required by the adapter to access the database.
The JNDI name acts as a placeholder for the connection used when your service is deployed to the BPEL server. This enables you to use different databases for development and later for production.
Note: For more information about JNDI concepts, refer to Oracle Fusion Middleware User's Guide for Technology Adapters.
Once you have completed creating a new connection for the service, you can add an interface by browsing through the available list in Oracle Applications.
For Oracle E-Business Suite Release 12:
If you are connecting to Oracle E-Business Suite Release 12, then the IREP File not present dialog appears indicating that Adapter could not find the Oracle Integration Repository data file corresponding to the database you are connecting in your workspace. Absence of the data file would make browsing or searching of Integration Repository tree considerably slow. You can choose to extract the data file and create a local copy of the Integration Repository data file. Once it is created successfully, Adapter will pick it up automatically next time and retrieve data from your local Integration Repository.
You can select one of the following options:
Click Yes to extract the Integration Repository data file.
Extracting Integration Repository Data File
After the system successfully creates a local copy of the Integration Repository data file, next time when you connect to the database, you will find the IRep Data File field appears in the Operation dialog indicating where your local copy exists with the creation date and time as part of the file name.
Using the Local Integration Repository Data File
Click No to query the Integration Repository data file from the live database you are connecting to display the Integration Repository tree.
Note: It is highly recommended that you create a local copy of the Integration Repository data file so that Adapter will query the data next time from the local copy in your workspace to enhance the performance.
Click Next in the Operation page to open the Oracle Applications Module Browser.
For Oracle E-Business Suite pre-Release 11.5.10:
If you are connecting to a pre-11.5.10 Oracle Applications instance, you must select the interface type in the Adapter Configuration Wizard. Select EDI Gateway to proceed.
Click Get Object in the Application Interface dialog to open the Oracle Applications Module Browser.
Once you have identified an existing database connection or completed a new connection for the service, you can select an e-Commerce Gateway interface through Oracle Applications Module Browser.
Note: Oracle Applications Module Browser includes the various product families that are available in Oracle Applications. For example, Applications Technology or Order Management Suite are product families in Oracle Applications. The product families contain the individual products. For example, Applications Technology contains the e-Commerce Gateway product. The product contains the business entities associated with the product. For example, the e-Commerce Gateway product contains the Advanced Shipment Notification business entity.
Business entities contain the various application modules that are exposed for integration. These modules are grouped according to the interface they provide. EDI programs can be found under the EDI category.
Specify an Interface from The Oracle Applications Module Browser
Select an inbound or outbound EDI program. You can select only one EDI program for each adapter service.
For example, navigate to Product Families > Applications Technology > e-Commerce Gateway > Advanced Shipment Notification > EDI to select EDI > IN: Ship Notice/Manifest (856/DESADV) (ECASNI) EDI concurrent program.
Note: You can also search for an EDI program by entering the name of the program in the Object Name field. Select the EDI check box and click Search.
The selected EDI concurrent program is added to Operation Objects.
Adapter Configuration Wizard - Application Interface Page
Click Finish to complete the process of configuring Adapter for Oracle Applications.
The wizard generates the WSDL file corresponding to the selected interface. This WSDL file is now available for the partner link.
Note: When you click Finish, two SQL files may be added to the project if a wrapper does not exist for the function. A wrapper is generated the very first time you create the e-Commerce Gateway based service. Subsequent services reuse the same wrapper.
Completing the Partner Link Configuration
Click Apply and then OK. The partner link is created with the required WSDL settings.
Use this step to configure a BPEL process by synchronously reading an existing order to obtain the shipping details.
To add a Partner Link for File Adapter to read shipping details:
In JDeveloper BPEL Designer, click BPEL Services in the Component palette.
Drag and drop File Adapter from the BPEL Services list into the right Partner Link swim lane of the process diagram before the partner link InsertShipment. The Adapter Configuration Wizard Welcome page appears.
In the Service Name dialog, enter a name for the file adapter service, such as getShippingDetails.
Click Next. The Adapter Interface dialog appears.
Specifying the Adapter Interface
Select the Define from operation and schema (specified later) radio button and click Next.
In the Operation dialog, specify the operation type. For example, select the Synchronous Read File radio button. This automatically populates the Operation Name field.
Specifying the Operation
Click Next to access the File Directories dialog.
Select the Logical Name radio button and specify directory for incoming files, such as inputDir.
Ensure the Delete files after successful retrieval check box is not selected.
Configuring the Input File
Click Next to open the File Name dialog.
Enter the name of the file for the synchronous read file operation. For example, enter order_data.xml. Click Next to open the Messages dialog.
Select the 'browse for schema file' icon to open the Type Chooser.
Click Type Explorer and select Project Schema Files > APPS_XX_BPEL_FND_REQUEST_WRAPPER_SUBMIT_REQUEST.xsd > InputParameters.
The selected schema information will be automatically populated in the URL and Schema Element fields.
Specifying Message Schema
Click Next and then Finish. The wizard generates the WSDL file corresponding to the partner link. The main Create Partner Link dialog box appears, specifying the new WSDL file getShippingDetails.wsdl.
Completing the Partner Link Configuration
Click Apply and OK to complete the configuration and create the partner link with the required WSDL settings for the File Adapter service.
The getShippingDetails Partner Link appears in the BPEL process diagram.
After adding and configuring the partner link, you can configure the following two Invoke process activities to invoke the EDI concurrent program and File Adapter partner link:
To get the shipping details that is received from the Receive activity by invoking the getShippingDetails partner link in an XML file.
To create a shipment notice by invoking InsertShipment partner link.
To add the first Invoke activity for a partner link to get shipping details:
In JDeveloper BPEL Designer, select BPEL Activities and Components in the component palette. Drag and drop the first Invoke activity into the center swim lane of the process diagram, between the receiveInput and callbackClient activities.
Link the Invoke activity to the getShippingDetails service. The Edit Invoke dialog appears.
Enter a name for the Invoke activity, then click the Create icon next to the Input Variable field to create a new variable. The Create Variable dialog box appears.
Create Input Variable
Select Global Variable, then enter a name for the variable. You can also accept the default name. Click OK.
Click the Create icon next to the Output Variable field to create a new variable. The Create Variable dialog box appears.
Select Global Variable, then enter a name for the variable. You can also accept the default name. Click OK.
Click Apply and OK in the Edit Invoke dialog box to finish configuring the Invoke activity.
The Invoke activity appears in the process diagram.
To add the second Invoke activity for a partner link to create a shipment notice:
In JDeveloper BPEL Designer, select BPEL Activities and Components in the component palette. Drag and drop the third Invoke activity into the center swim lane of the process diagram, between the first Invoke and callbackClient activities.
Link the Invoke activity to the InsertShipment service. The Edit Invoke dialog box appears.
The Operation is automatically selected, depending on the EDI concurrent program that you chose when configuring the partner link.
Repeat Step 3 to Step 6 described in the first Invoke activity procedure.
Setting Header Properties for Application Context
Use the following steps to set the header message properties required to pass application context required to complete the BPEL process:
Select the Properties tab to set the Header message properties required to pass application context required to complete the BPEL process.
Setting Header Message Properties
Scroll down to locate the jca.apps.Username property from the list and double click the associated value field to enable the Adapter Property Value icon.
Click the icon to open the Adapter Property Value dialog for the selected jca.apps.Username property.
Entering the Header Message Property Value
Select the Expression radio button and enter 'OPERATIONS' as the property value.
Repeat Step 2 to Step 4 to assign 'Purchasing, Vision Operations (USA)' for jca.apps.Responsibility.
Click Apply and then OK to complete the Invoke activity.
Use the Assign activity to pass the output of getShippingDetails service as an input to the InsertShipment service.
To add an Assign activity:
In JDeveloper BPEL Designer, select BPEL Activities and Components in the component palette. Drag and drop the Assign activity into the center swim lane of the process diagram between the two Invoke activities that you just created earlier.
Double-click the Assign activity to access the Edit Assign dialog.
Click the General tab to enter a name for the Assign activity. For example, setShipInfo.
Select the Copy Operation tab, click the 'Plus' sign icon and select Copy Operation from the menu. The Create Copy Operation window appears.
Specifying a Copy Operation Action
Enter the parameter information:
In the From navigation tree, select type Variable, then navigate to Variable > Process > Variables > Invoke_SynchRead_OutputVariable and select body.
In the To navigation tree, select type Variable, then navigate to Variable > Process > Variables > Invoke_InsertShipment_InputVariable and select Input Parameters.
Click OK. The Edit Assign dialog box appears.
Click Apply and OK to complete the configuration of the Assign activity.
Completed Concurrent Program BPEL Process Project
Click the composite.xml to display the Oracle JDeveloper composite diagram:
Note: Click the Source tab of composite.xml to enter a value for the physical directory inputDir for the reference getShippingDetails (such as /usr/tmp).
<property name="inputDir" type="xs:string" many="false" override="may">/usr/tmp</property>
Specifying the Physical Directory for the Property
After designing the BPEL process, the next step is to deploy, run and monitor it.
Deploy the BPEL process.
Test the BPEL process.
Verify records in Oracle Applications.
You must deploy the BPEL process before you can run it. The BPEL process is first compiled, and then deployed to the application server (Oracle WebLogic Server) that you have established the connection.
You must have established the connectivity between the deign-time environment and an application server.
For more information, see Configuring the Data Source in Oracle WebLogic Server and Creating an Application Server Connection.
Oracle WebLogic Server has been started.
Before deploying the BPEL process, you need to start the Oracle WebLogic Server that you have established the connection.
If a local instance of the WebLogic Server is used, start the WebLogic Server by selecting Run > Start Server Instance from Oracle JDeveloper.
Once the WebLogic Admin Server "DefaultServer" instance is successfully started, you should find that <Server started in Running mode> and DefaultServer started message in the Running:DefaultServer and Messages logs.
To deploy the BPEL process
Select the BPEL project in the Applications Navigator.
Right-click the project name, and then select Deploy > [project name] > [serverConnection] from the menu that appears.
The BPEL process is compiled and deployed. You can check the progress in the Messages window.
Once the BPEL process is deployed, you can manage and monitor the process from the Oracle Enterprise Manager Fusion Middleware Control Console. You can also test the process and the integration interface by manually initiating the process.
To test the BPEL process
Navigate to Oracle Enterprise Manager Fusion Middleware Control Console (http://<servername>:<portnumber>/em). The composite you deployed is displayed in the Applications Navigation tree.
Enter username (such as weblogic) and password and click Login to log in to a farm.
You may need to select an appropriate target instance farm if there are multiple target Oracle Enterprise Manager Fusion Middleware Control Console farms.
From the Farm base domain, expand the SOA > soa-infra to navigate through the SOA Infrastructure home page and menu to access your deployed SOA composite applications running in the SOA Infrastructure for that managed server.
Note: The Farm menu always displays at the top of the navigator. As you expand the SOA folder in the navigator and click the links displayed beneath it, the SOA Infrastructure menu becomes available at the top of the page.
Click the SOA composite application that you want to initiate (such as 'InsertShipment') from the SOA Infrastructure.
Click Test at the top of the page.
The Test Web Service page for initiating an instance appears. You can specify the XML payload data to use in the Input Arguments section.
Enter the input string required by the process and click Test Web Service to initiate the process.
Testing Web Service
The test results appear in the Response tab upon completion.
Click the Instances tab. The SOA composite application instance ID, name, conversation ID, most recent known state of each instance since the last data refresh of the page are displayed.
In the Instance ID column, click a specific instance ID to show the message flow through the various service components and binding components. The Flow Trace page is displayed.
In the Trace section, you should find the sequence of the message flow for the service binding component (insertshipnotice_client_ep), BPEL component (InsertShipment), and reference binding components (getShippingDetails and InsertShipment). All involved components have successfully received and processed messages.
If any error occurred during the test, you should find it in the Faults section.
Click your BPEL service component instance link (such as InsertShipment) to display the Instances page where you can view execution details for the BPEL activities in the Audit Trail tab.
Click the Flow tab to check the BPEL process flow diagram. Click an activity of the process diagram to view the activity details and flow of the payload through the process.
To verify records in Oracle Applications
Log in to Oracle Applications as the System Administrator.
Select Requests from the View menu.
Search for the Request by entering the Request Id that you got from the audit trail, then click Find.
Find Requests Dialog Box
The Request details are displayed. You can check for details such as the Phase and Status of the request.
If the Status of the request is Complete, you can also query the appropriate table in Oracle Applications to search for the relevant records that have been inserted.
Querying Oracle Applications for a Record
Copyright © 2005, 2009, Oracle and/or its affiliates. All rights reserved.