Skip Headers

Oracle Fusion Middleware Adapter for Oracle Applications User's Guide
11g Release 1 (11.1.1.7.0)
Part Number E10537-05
Go to Table of Contents
Contents
Go to previous page
Previous
Go to next page
Next

Using e-Commerce Gateway

This chapter covers the following topics:

Overview of e-Commerce Gateway Integration

Oracle e-Commerce Gateway provides a common, standards-based approach for Electronic Data Interchange (EDI) integration between Oracle E-Business Suite 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 E-Business Suite. 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 E-Business Suite. This allows for seamless flow of information in an ever expanding trading partner base.

Oracle e-Commerce Gateway includes prebuilt 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 prebuilt 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 part of the Oracle E-Business Suite Documentation Library which can be accessed on the Oracle Technology Network (OTN).

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.

Design-Time Tasks for e-Commerce Gateway

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.

SOA Composite Application with 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.

When the SOA Composite application with BPEL process has been 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 Applications 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.

  1. Create a new SOA Composite application with BPEL process

  2. Add a partner link

  3. Add a partner link for File Adapter

  4. Configure Invoke activities

  5. Configure an Assign activity

Creating a New SOA Composite Application with BPEL Process

The first configuration task is to create a new SOA Composite application with BPEL process.

To create a new SOA Composite application with BPEL process

  1. Launch Oracle JDeveloper.

  2. 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

    the picture is described in the document text

  3. 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.

  4. Enter an appropriate name for the project in the Project Name field. For example, InsertShipNotice.

    The Create SOA Application - Name your project Page

    the picture is described in the document text

  5. 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

    the picture is described in the document text

  6. Select Composite With BPEL from the Composite Template list, and then click Finish. You have created a new application, and a SOA project. This automatically creates a SOA Composite application

    The Create BPEL Process page is displayed.

    The Create BPEL Process Page

    the picture is described in the document text

  7. Leave the default BPEL 1.1 Specification selection unchanged. This creates a BPEL project that supports the BPEL 1.1 specification.

    Enter an appropriate name for the BPEL 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 picture is described in the document text

Adding a Partner Link

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

  1. 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.

  2. Enter a service name in the Service Name field. For example, InsertShipment.

    Click Next. The Service Connection page appears.

    Specifying a Database Service Connection

    the picture is described in the document text

  3. 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.

  4. 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.

    Click Next.

    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:

    For Oracle E-Business Suite Release 11.5.9:

    If you are connecting to an Oracle E-Business Suite Release 11.5.9 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.

  5. 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

    the picture is described in the document text

    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.

  6. Click OK.

    The selected EDI concurrent program is added to Operation Objects.

    Adapter Configuration Wizard - Application Interface Page

    the picture is described in the document text

    Click Next.

  7. 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

    the picture is described in the document text

  8. Click Apply and then OK. The partner link is created with the required WSDL settings.

Adding a Partner Link for File Adapter

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:

  1. 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.

    Click Next.

  2. In the Service Name dialog, enter a name for the file adapter service, such as getShippingDetails.

  3. Click Next. The Adapter Interface dialog appears.

    Specifying the Adapter Interface

    the picture is described in the document text

    Select the Define from operation and schema (specified later) radio button and click Next.

  4. 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

    the picture is described in the document text

    Click Next to access the File Directories dialog.

  5. 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

    the picture is described in the document text

    Click Next to open the File Name dialog.

  6. 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.

  7. 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

    the picture is described in the document text

  8. 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

    the picture is described in the document text

    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.

Configuring Invoke Activities

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:

  1. To get the shipping details that is received from the Receive activity by invoking the getShippingDetails partner link in an XML file.

  2. To create a shipment notice by invoking InsertShipment partner link.

To add the first Invoke activity for a partner link to get shipping details:

  1. In Oracle JDeveloper BPEL Designer, expand the BPEL Constructs from 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.

  2. Link the Invoke activity to the getShippingDetails service. The Edit Invoke dialog appears.

  3. 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

    the picture is described in the document text

  4. Select Global Variable, then enter a name for the variable. You can also accept the default name. Click OK.

  5. Click the Create icon next to the Output Variable field to create a new variable. The Create Variable dialog box appears.

  6. Select Global Variable, then enter a name for the variable. You can also accept the default name. Click OK.

    the picture is described in the document text

  7. 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:

  1. In Oracle JDeveloper BPEL Designer, expand the BPEL Constructs from 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.

  2. 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.

  3. Repeat Step 3 to Step 6 described in the first Invoke activity procedure.

    Click Apply and OK.

    the picture is described in the document text

  4. Setting Header Properties for Applications Context

    Use the following steps to set the header message properties required to pass applications context required to complete the BPEL process:

    1. Select the Properties tab to set the Header message properties required to pass applications context required to complete the BPEL process.

      Setting Header Message Properties

      the picture is described in the document text

    2. 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.

    3. Click the icon to open the Adapter Property Value dialog for the selected jca.apps.Username property.

      Entering the Header Message Property Value

      the picture is described in the document text

    4. Select the Expression radio button and enter 'OPERATIONS' as the property value.

      Click OK.

    5. Repeat Step 2 to Step 4 to assign 'Purchasing, Vision Operations (USA)' for jca.apps.Responsibility.

  5. Click Apply and then OK to complete the Invoke activity.

Configuring an Assign Activity

Use the Assign activity to pass the output of getShippingDetails service as an input to the InsertShipment service.

To add an Assign activity:

  1. In Oracle JDeveloper BPEL Designer, expand the BPEL Constructs from 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.

  2. 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.

  3. Select the Copy Rules tab and expand the source and target trees:

  4. Click Apply and OK to complete the configuration of the Assign activity.

Completed Concurrent Program BPEL Process Project

the picture is described in the document text

Click the composite.xml to display the Oracle JDeveloper composite diagram:

the picture is described in the document text

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

the picture is described in the document text

Run-Time Tasks for e-Commerce Gateway

After designing the SOA Composite application with BPEL process, the next step is to deploy, run and monitor it.

  1. Deploy the SOA Composite application with BPEL process

  2. Test the deployed SOA Composite application with BPEL process

  3. Verify records in Oracle E-Business Suite

Deploying the SOA Composite Application with BPEL Process

To invoke the service (InsertShipment) from the BPEL client contained in the SOA composite, the SOA composite needs to be deployed to the Oracle WebLogic managed server. This can be achieved using Oracle JDeveloper. Once the composite is deployed, it can be tested from the Oracle Enterprise Manager Fusion Middleware Control Console.

Prerequisites

Before deploying the SOA composite with BPEL process using Oracle JDeveloper, you must have established the connectivity between the design-time environment and the run-time server. For more information, see Configuring the Data Source in Oracle WebLogic Server and Creating an Application Server Connection.

Note: 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, the <Server started in Running mode> and DefaultServer started message in the Running:DefaultServer and Messages logs should appear.

the picture is described in the document text

To deploy the SOA Composite application with BPEL process

  1. Select the SOA Composite project in the Applications Navigator.

  2. Right-click the project name, and then select Deploy > [project name] > [serverConnection] from the menu that appears.

    For example, you can select Deploy > InsertShipNotice > soa-server1 to deploy the process if you have the connection set up appropriately.

    the picture is described in the document text

    Note: If this is the first time to set up server connection, then the Deployment Action window appears. Select 'Deploy to Application Server' and click Next.

    the picture is described in the document text

    In the Deploy Configuration window, ensure the following information is selected before clicking Next to add a new application server:

    The steps to create a new Oracle WebLogic Server connection from JDeveloper are covered inCreating an Application Server Connection.

  3. In the Select Server page, select 'soa-server1' that you have established the server connection earlier. Click Next.

    the picture is described in the document text

  4. In the SOA Servers page, accept the default target SOA Server ('soa-server1') selection.

    the picture is described in the document text

    Click Next and Finish.

    If you are deploying the composite for the first time from your Oracle JDeveloper session, the Authorization Request window appears. Enter username and password information specified during Oracle SOA Suite installation. Click OK.

  5. Deployment processing starts. Monitor deployment progress and check for successful compilation in the SOA - Log window.

    the picture is described in the document text

    Verify that the deployment is successful in the Deployment - Log window.

Testing the Deployed SOA Composite Application with BPEL Process

Once the BPEL process contained in a SOA Composite application is deployed, you can manage and monitor the process from the Oracle Enterprise Manager Fusion Middleware Control Console. You can also test the integration by manually initiating the process.

To test the deployed SOA Composite application with BPEL process

  1. Navigate to Oracle Enterprise Manager Fusion Middleware Control Console (http://<servername>:<portnumber>/em). The composite you deployed is displayed in the Applications Navigation tree.

  2. 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.

  3. 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.

  4. 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 picture is described in the document text

    The test results appear in the Response tab upon completion.

  5. 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.

  6. 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.

Verifying Records in Oracle E-Business Suite

To verify records in Oracle E-Business Suite

  1. Log in to Oracle E-Business Suite as the System Administrator.

  2. Select Requests from the View menu.

  3. Search for the Request by entering the Request Id that you got from the audit trail, then click Find.

    Find Requests Dialog Box

    the picture is described in the document text

  4. The Request details are displayed. You can check for details such as the Phase and Status of the request.

  5. If the Status of the request is Complete, you can also query the appropriate table in Oracle E-Business Suite to search for the relevant records that have been inserted.

    Querying Oracle E-Business Suite for a Record

    the picture is described in the document text