Skip Headers
Oracle® Application Server Adapter for Oracle Applications User's Guide
10g Release 2 (10.1.2)
B16498-02
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

5 Using e-Commerce Gateway

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.

This chapter includes the following sections:

Overview of e-Commerce Gateway Integration

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.


See Also:

Oracle e-Commerce Gateway User's Guide for detailed information on Oracle e-Commerce Gateway. This guide is a part of the Oracle Applications documentation library. Oracle Applications documentation can be accessed from the following link:

http://www.oracle.com/technology/documentation/applications.html


OracleAS Adapter for 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 Steps

OracleAS 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 OracleAS Adapter for Oracle Applications to use e-Commerce Gateway. It includes the following topics:

Prerequisites to Configuring OracleAS Adapter for Oracle Applications

You need to populate certain variables in the BPEL PM in order to provide context information for Oracle Applications. The context information required for an EDI transaction includes the username and responsibility of an Oracle Applications user that has sufficient privileges to run the program. The default value passed for the username is SYSADMIN. The default value passed for responsibility is SYSTEM ADMINISTRATOR.

You can change the default values specified in the generated WSDL for the username and responsibility. 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 variable with values for username and responsibility. The context information can be specified by configuring an Assign activity before the Invoke activity in the BPEL PM.

Configuring OracleAS Adapter for Oracle Applications

This section describes the tasks required to configure OracleAS Adapter for Oracle Applications using the Adapter Configuration Wizard in Oracle JDeveloper.

This section comprises the following:

Creating a New BPEL Project

The first configuration task is to create a new BPEL project. Use the following steps to create a new BPEL project:

  1. Open JDeveloper BPEL Designer.

  2. From the File menu, select New. The New Gallery dialog box is displayed.

  3. Select All Items from the Filter By box. This displays a list of available categories.

  4. Expand the General node, and then select Projects.

  5. Select BPEL Process Project from the Items group, as shown in Figure 5-1.

    Figure 5-1 Creating a New BPEL Process Project

    Description of Figure 5-1  follows
    Description of "Figure 5-1 Creating a New BPEL Process Project"

  6. Click OK. The BPEL Process Project dialog box is displayed.

  7. In the BPEL Process Name field, enter a descriptive name. For example, InsertShipNotice.

  8. From the Template box, select Asynchronous BPEL Process. Keep the default selection for Use Default under Project Content, as shown in Figure 5-2.

    Figure 5-2 Specifying a Name for the New BPEL Process Project

    Description of Figure 5-2  follows
    Description of "Figure 5-2 Specifying a Name for the New BPEL Process Project"

  9. Click OK. A new BPEL process, with the required source files including bpel.xml, InsertShipNotice.bpel, and InsertShipNotice.wsdl is created, as shown in Figure 5-3.

    Figure 5-3 New BPEL Process Project

    Description of Figure 5-3  follows
    Description of "Figure 5-3 New BPEL Process Project"

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.

Use the following steps to add a partner link:

  1. Drag and drop PartnerLink, from the Component Palette, into the border area of the process diagram. The Create Partner Link dialog box is displayed.

  2. Click the Define Adapter Service icon in WSDL Settings. The Adapter Configuration Wizard is displayed.

  3. Click Next. The Adapter Type dialog box is displayed.

  4. Select Oracle Applications, as shown in Figure 5-4. Click Next.

    Figure 5-4 Selecting OracleAS Adapter for Oracle Applications

    Description of Figure 5-4  follows
    Description of "Figure 5-4 Selecting OracleAS Adapter for Oracle Applications"

  5. The Service Name dialog box is displayed, as shown in Figure 5-5. Enter the following information:

    1. In the Service Name field, enter a service name.

    2. In the Description field, enter a description for the service. This is an optional field. Click Next.

    Figure 5-5 Specifying the Service Name

    Description of Figure 5-5  follows
    Description of "Figure 5-5 Specifying the Service Name"

  6. The Service Connection dialog box is displayed. Enter the Java Naming and Directory Interface (JNDI) name in the Database Server JNDI Name field. 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 production.


    See Also:

    Oracle Application Server Adapter Concepts for understanding JNDI concepts

    Figure 5-6 shows how to create a new database connection.

    Figure 5-6 Creating a New Database Connection

    Description of Figure 5-6  follows
    Description of "Figure 5-6 Creating a New Database Connection"

  7. Click New to define a database connection. The Create Database Connection Wizard is displayed.


    Note:

    You need to connect to the database where Oracle Applications is running.

  8. Enter the following information in the Type dialog box:

    1. In the Connection Name field, specify a unique name for the database connection.

    2. From the Connection Type box, select the type of connection for your database connection.

      Figure 5-7 shows the Type dialog box.

      Figure 5-7 Specifying the Connection Name and Type of Connection

      Description of Figure 5-7  follows
      Description of "Figure 5-7 Specifying the Connection Name and Type of Connection"

  9. Click Next. The Authentication dialog box is displayed.

  10. Enter information in the following fields:

    1. In the UserName field, specify a unique name for the database connection.

    2. In the Password field, specify a password for the database connection.

  11. Click Next. The Connection dialog box is displayed.

  12. Enter information in the following fields:

    1. From the Driver list, select Thin.

    2. In the Host Name field, specify the host name for the database connection.

    3. In the JDBC Port field, specify the port number for the database connection.

    4. In the SID field, specify a unique SID value for the database connection.

    Figure 5-8 shows the Connection dialog box.

    Figure 5-8 Specifying the New Database Connection Information

    Description of Figure 5-8  follows
    Description of "Figure 5-8 Specifying the New Database Connection Information"

  13. Click Next. The Test dialog is displayed.

  14. Click Test Connection to determine whether the specified information establishes a connection with the database.

  15. Click Next. The Service Connection dialog box is displayed, providing a summary of the database connection.

  16. Click Finish to complete the process of creating a new database connection.

Once you have completed creating a new connection for the service, you can select an e-Commerce Gateway interface by browsing through the modules available in Oracle Applications.

  1. Click Next in the Service Connection dialog box. The Operation dialog box is displayed.


    Note:

    If you are connecting to a pre-11.5.10 Oracle Applications instance, then you would be required to select the interface to Oracle Applications data. Select EDI Gateway to proceed. Select Inbound into Oracle Applications or Outbound from Oracle Applications depending on whether data is inbound into Oracle Applications or outbound from Oracle Applications. Next, click Get CP to choose the EDI concurrent program from the Oracle Applications Module Browser.

  2. Click Get Object to open the Oracle Applications Module Browser. Figure 5-9 shows the Oracle Applications Module Browser.

    Figure 5-9 Specifying the EDI Concurrent Program

    Description of Figure 5-9  follows
    Description of "Figure 5-9 Specifying the EDI Concurrent Program"

    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 accoding to the interface they provide. EDI programs can be found under the EDI category.

  3. Select an inbound or outbound EDI program. Click OK. You can select only one EDI program for each adapter service.


    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.

  4. The EDI program is added to Operation Objects. Click Next in the Operation dialog box.

  5. Click Finish. When you click Finish, the wizard generates the WSDL file corresponding to the selected interface. This WSDL file is now available for the partner link. Figure 5-10 shows the Create Partner Link dialog box after the WSDL file has been generated.


    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 wrapper that is created.

    Figure 5-10 Completing the Partner Link Configuration

    Description of Figure 5-10  follows
    Description of "Figure 5-10 Completing the Partner Link Configuration"

  6. Click OK. The partner link is created with the required WSDL settings.

Configuring the Invoke Activity

After adding and configuring the partner link, the next task is to configure the BPEL process itself. You can start by configuring the Invoke process activity to invoke the EDI concurrent program.

The following steps discuss configuring the Invoke activity:

  1. Drag and drop Invoke into the process map window. shows the Invoke activity after it has been added to the process map.

    Figure 5-11 Adding the Invoke Activity

    Description of Figure 5-11  follows
    Description of "Figure 5-11 Adding the Invoke Activity"

  2. Double-click Invoke in the process map to open the Invoke dialog box. The General tab is selected by default. Figure 5-12 shows the Invoke dialog box.

    Figure 5-12 Configuring the Invoke Activity

    Description of Figure 5-12  follows
    Description of "Figure 5-12 Configuring the Invoke Activity"

  3. In the Partner Link box, select the partner link to invoke. This is the partner link that you configured in the previous section. The Operation is automatically selected, depending on the EDI concurrent program that you chose when configuring the partner link.

  4. Click the Create icon next to the Input Variable field. Enter a descriptive name for the variable in the Create Variable dialog box that appears. You can also accept the default name. Click OK. Figure 5-13 shows the Create Variable dialog box.

    Figure 5-13 Creating the Input Variable

    Description of Figure 5-13  follows
    Description of "Figure 5-13 Creating the Input Variable"

  5. Click the Create icon next to the Output Variable field. Enter a descriptive name for the variable in the Create Variable dialog box that appears. You can also accept the default name. Click OK.

  6. In the Invoke dialog box, click Apply, andthen click OK.


    Note:

    You can define a Input Header Variable under the Adapters tab of the Invoke dialog box. This variable can be used to provide context information for Oracle Applications.

Configuring the Transform Activity

The Transform activity can be used to configure the parameters for the input and output variable. The Transform activity can also be used if variable values need to be transformed before updating them in Oracle Applications.

The following steps discuss configuring the Transform activity:

  1. Drag and drop Transform into the process map window. The Transform activity should be placed in between Receive and Invoke. Figure 5-14 shows the process map window after the Transform activity has been added.

    Figure 5-14 Adding the Transform Activity

    Description of Figure 5-14  follows
    Description of "Figure 5-14 Adding the Transform Activity"

  2. Double-click Transform in the process map to open the Transform dialog box. The Transformation tab is selected by default. Figure 5-15 shows the Transform dialog box.

    Figure 5-15 Configuring the Transform Activity

    Description of Figure 5-15  follows
    Description of "Figure 5-15 Configuring the Transform Activity"

  3. Select the Source Variable and Target Variable from the respective boxes. Elements are mapped from the Source Variable to the Target Variable.

  4. Select the Source Part of the variable from which to map elements. For example, the source part may be a payload schema consisting of a purchase order request.

  5. Select the Target Part of the variable to which to map elements. For example, the target part may be a payload schema consisting of a purchase order acknowledgment.

  6. Mapper File specifies the file in which you create the mappings using the XSLT Mapper Transformation tool. Click the Create icon next to the Mapper File field to create a new transformation mapping file.

  7. The transformation mapping file is displayed. The Design view is displayed by default. Figure 5-16 shows the Design view for the transformation mapping file.

    Figure 5-16 Editing the Transformation Mapping File

    Description of Figure 5-16  follows
    Description of "Figure 5-16 Editing the Transformation Mapping File"

  8. You can define the parameter values in the Design view. Drag a string function to the Design area. Connect the function to the appropriate parameter for which you want to define a value.


    Note:

    You can use an input parmaeter value from the source variable, transform it using a string function, and use it as the input parameter value for the target variable.

  9. Double-click the icon for the function. The Edit Function dialog box is displayed. Figure 5-17 shows the Edit Function dialog box.

    Figure 5-17 Supplying the Function Parameters

    Description of Figure 5-17  follows
    Description of "Figure 5-17 Supplying the Function Parameters"

  10. Repeat steps 8 and 9 for all the parameters that you need to supply.


    Note:

    You can use both the Transform and Assign activities to configure the variables. If the number of mappings to be configured is less, say three or four, then you can use the Assign activity. The Transform activity is more suitable for situations where the number of mappings is large or where variable transformation is required.

Run-Time Steps

After designing the BPEL process, the next step is to deploy, run and monitor it. This section disscusses the following:

Deploying the BPEL Process

You need to deploy the BPEL process before you can run it. The BPEL process is first compiled and then deployed to the BPEL server. The following steps discuss deploying the BPEL process to a BPEL server:

  1. Select the BPEL project in the Applications window.

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

  3. Select Local BPEL Server followed by Deploy to Default Domain, if you are deploying the process on the local BPEL server. Figure 5-18 illustrates deploying a BPEL process to a local BPEL server.

    Figure 5-18 Deploying the BPEL Process

    Description of Figure 5-18  follows
    Description of "Figure 5-18 Deploying the BPEL Process"


    Note:

    You can select Invoke Deployment Tool if you want to deploy to a different BPEL server.

  4. The Password Prompt dialog box appears. Enter the password for the default domain in the Domain Password field. Click OK. Figure 5-19 shows the Password Prompt dialog box.

    Figure 5-19 Specifying the Domain Password

    Description of Figure 5-19  follows
    Description of "Figure 5-19 Specifying the Domain Password"

  5. The BPEL process is compiled and deployed. You can check the progress in the Messages window. Figure 5-20 shows the Messages window.

    Figure 5-20 Messages Window

    Description of Figure 5-20  follows
    Description of "Figure 5-20 Messages Window"

Testing the BPEL Process

Once the BPEL process is deployed, it can be seen in the BPEL Console. You can manage and monitor the process from the BPEL Console. You can also test the process and the integration interface by manually initiating the process. The following steps discuss manually initiating and monitoring the BPEL process:

  1. To open the BPEL Console, click Start, and choose Programs. In the Programs menu, select Oracle - ORACLE_HOME, Oracle BPEL Process Manager 10.1.2, and then select BPEL Console.

  2. The BPEL Console login screen is displayed. Select Default in the Domain box. Enter the password for the default domain in the Password field. Click Login. Figure 5-21 shows the BPEL Console login screen.

    Figure 5-21 BPEL Console Login Screen

    Description of Figure 5-21  follows
    Description of "Figure 5-21 BPEL Console Login Screen"

  3. Oracle BPEL Console is displayed. The list of deployed processes is shown under Deployed BPEL Processes. Figure 5-22 shows the BPEL Console screen.

    Figure 5-22 Deployed BPEL Processes

    Description of Figure 5-22  follows
    Description of "Figure 5-22 Deployed BPEL Processes"

  4. Click the BPEL process that you want to initiate. The Initiate page is displayed. Enter the input string required by the process.

  5. Click Post XML Message to initiate the process.

  6. The BPEL process is now initiated. You can check the process flow by clicking the Visual Flow icon. Figure 5-23 shows the BPEL Console Initiate page.

    Figure 5-23 BPEL Console Initiate Page

    Description of Figure 5-23  follows
    Description of "Figure 5-23 BPEL Console Initiate Page"

  7. The audit trail provides information on the steps that have been executed. The audit trail also records the Request ID that is returned for the transaction. You can check the audit trail by clicking the Audit Instance icon.

Verifying Records in Oracle Applications

You can use the following steps to track the process in Oracle Applications:

  1. Log in to Oracle Applications as the System Administrator. Figure 5-24 shows the Oracle Applications login screen.

    Figure 5-24 Oracle Applications Login Screen

    Description of Figure 5-24  follows
    Description of "Figure 5-24 Oracle Applications Login Screen"

  2. Select Requests from the View menu.

  3. Search for the Request by entering the Request Id that you got from the audit trail, and then click Find. Figure 5-25 shows the Find Requests dialog box.

    Figure 5-25 Find Requests Dialog Box

    Description of Figure 5-25  follows
    Description of "Figure 5-25 Find Requests Dialog Box"

  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, then you can also query the appropriate table in Oracle Applications to search for the relevant records that have been inserted. Figure 5-26 shows a simple SQL query on an Oracle Applications table.

    Figure 5-26 Querying Oracle Applications for a Record

    Description of Figure 5-26  follows
    Description of "Figure 5-26 Querying Oracle Applications for a Record"