Skip Headers

Oracle Application Server Adapter for Oracle Applications User's Guide
10g (10.1.3.5.0)
Part Number E14293-01
Go to Table of Contents
Contents
Go to previous page
Previous
Go to next page
Next

Using e-Commerce Gateway for BPEL Process Integration

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

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

OracleAS 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

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 describes the tasks required to configure OracleAS Adapter for Oracle Applications using the Adapter Configuration Wizard in Oracle JDeveloper.

Prerequisites to Configuring e-Commerce Gateway

Populating Applications Context Header Variables

You need to populate certain variables in the SOA Suite to provide context information required in EDI/concurrent programs in order for an Oracle Applications user that has sufficient privileges to run the programs.

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 value for the Username is SYSADMIN, the default value for 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 variable with values. The context information can be specified by configuring an Assign activity before the Invoke activity in the BPEL PM.

Following is a list of the procedures required to accomplish the design-time tasks.

  1. Create a new BPEL project

  2. Add a partner link

  3. Add a partner link for File Adapter

  4. Configure the Invoke activity

  5. Configure the Assign activity

Creating a New BPEL Project

The first configuration task is to create a new BPEL project.

To create a new BPEL project

  1. Open JDeveloper BPEL Designer.

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

  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.

    Creating a New BPEL Process Project

    the picture is described in the document text

  6. Click OK. The BPEL Project Creation Wizard - Project Settings dialog box appears.

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

    Keep the default selection Use Default Project Settings unchanged.

  8. Keep the default selection Template as the Type field. Select Asynchronous BPEL Process as the BPEL process type.

    Specifying a Name for the New BPEL Process Project

    the picture is described in the document text

  9. Click OK.

    A new asynchronous BPEL process is created with the receiveInput and callbackClient activities.

    The required source files including bpel.xml, InsertShipNotice.bpel, and InsertShipNotice.wsdl are also generated.

    New BPEL Process Project

    the picture is described in the document text

Adding a Partner Link

A partner link defines the link name, type, and the role of the BPEL process that interacts with the partner service.

To add a partner link

  1. In JDeveloper BPEL Designer, click Services in the Component palette.

    Drag and drop Oracle Applications icon into the border area of the process diagram.

    The Adapter Configuration Wizard appears.

  2. Click Next. The Service Name dialog box appears. Enter the following information:

    Specifying a Service Name

    the picture is described in the document text

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

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

  3. Click Next. The Service Connection dialog box appears.

  4. You can perform either one of the following options for your database connection:

    Note: You need to connect to the database where Oracle E-Business Suite is running.

  5. Once you have created a new connection or selected an existing connection, you can select an e-Commerce Gateway interface by browsing through the modules available in Oracle E-Business Suite.

  6. Click Next in the Service Connection dialog box.

    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 box appears indicating that Adapter for Oracle Applications 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 for Oracle Applications 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 pre-Release 11.5.10:

    If you are connecting to a pre-11.5.10 Oracle E-Business Suite instance, you must select the interface type in the Adapter Configuration Wizard. 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. Select EDI Gateway to proceed.

    Click Add to open the Oracle Applications Module Browser.

  7. The Oracle Applications Module Browser combines interface data from Oracle Integration Repository with information about the additional interfaces supported by Adapter for Oracle Applications, organized in a tree hierarchy.

    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.

  8. Click OK.

    The selected EDI concurrent program is added to Operation Objects.

    Application Interface Dialog

    the picture is described in the document text

    Click Next.

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

  10. Click Apply and 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 adding a partner link for File Adapter to synchronously read 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, drag and drop the File Adapter service from the Service section of the Component Palette into the Partner Link area of the process diagram. The Adapter Configuration Wizard welcome page appears.

  2. Click Next. The Service Name dialog box appears.

  3. Enter a name for the File Adapter service, such as GetOrder. You can add an optional description of the service.

  4. Click Next and the Operation dialog box appears.

    Specifying the Operation

    the picture is described in the document text

  5. Specify the operation type, for example Synchronous Read File. This automatically populates the Operation Name field.

    Click Next to access the File Directories dialog box.

    Configuring the Input File

    the picture is described in the document text

  6. Select the Logical Name check box and specify the logical directory for the incoming file. Uncheck the Delete files after successful retrieval check box. Click Next.

  7. Enter the name of the file for the synchronous read file operation, for example, enter 'order_data_xmlg.xml'. Click Next. The Messages dialog box appears.

  8. Select Browse to open the Type Chooser to specify the Schema location and element.

    From the Type Chooser window, expand the node by selecting Project Schema Files > APPS_XX_BPEL_FND_REQUEST_WRAPPER_SUBMIT_REQUEST.xsd > InputParameters.

    Selecting Schema from the Type Chooser

    the picture is described in the document text

  9. Click OK to populate the selected values in the Messages dialog box.

    Populating Selected Message Schema and Element

    the picture is described in the document text

  10. 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 GetOrder.wsdl.

    Click Apply and then OK to complete the configuration and create the partner link with the required WSDL settings for the File Adapter service.

    Create Partner Link

    the picture is described in the document text

    The GetOrder Partner Link appears in the BPEL process diagram.

    Adding the Partner Link for File Adapter

    the picture is described in the document text

Configuring the Invoke Activity

After adding and configuring the partner link, you can configure the following two Invoke 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 GetOrder 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 JDeveloper BPEL Designer, select Process Activities in the Component Palette. Drag and drop the first Invoke activity into the process diagram, between the receiveInput and callbackClient activities.

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

  3. Enter a name for the Invoke activity. 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 and 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 and 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 BPEL process diagram.

To add the second Invoke activity for a partner link to create a shipment notice:

  1. In JDeveloper BPEL Designer, select Process Activities in the Component Palette. Drag and drop the second Invoke activity into 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.

    the picture is described in the document text

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

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

    To Create the Header Variable:

    1. Click on the Adapters tab in the Edit Invoke dialog box and click Browse Variable... icon for the Input Header Variable field.

      Specifying Input Header Variable

      the picture is described in the document text

    2. In the Variable Chooser dialog box, right-click on the Variables node and select Create Variable option from the menu.

    3. Enter header in the Name field.

    4. Select Message Type and click the Browse Message Type... icon to open Type Chooser dialog box.

    5. Expand the Partner Link node to locate the Header_msg node {http://xmlns.oracle.com/pcbpel/adapter/appscontext/}Header_msg for your partner link. The Header_msg node should be under the path, Your Partner Link WSDL > AppsContextHeader.wsdl > Message Types > Header_msg.

      Declaring Header Variable

      the picture is described in the document text

    6. Click OK to return to the Create Variable dialog box with your selected message type populated.

      Populating Selected Header Variable

      the picture is described in the document text

    7. To view your header variable with Username, Responsibility, ORG_ID, Responsibility Application, Security Group, and NLS Language, click the Browse Message Type... icon to open Variable Chooser dialog box. Locate the header variable to view the variable hierarchical structure with these parameters needed for applications context.

    8. Click OK to return to the Edit Invoke dialog with the selected header variable populated for the Input Header Variable field. Click Apply to complete the header creation.

      Populating Input Header Variable

      the picture is described in the document text

      How to assign header variables, see Configure the Assign activity.

Configuring the Assign Activity

This step is to configure two Assign activities in order to:

To add the first Assign activity to set applications context information:

  1. In JDeveloper BPEL Designer, drag and drop the Assign activity from the Component Palette into the process diagram between the two Invoke activities.

    Adding an Assign Activity

    the picture is described in the document text

  2. Double-click the Assign activity to access the Edit Assign dialog box.

  3. Click the General tab to enter the name for the Assign activity, such as 'SetAppsContext'.

  4. On the Copy Operation tab, click Create and select Copy Operation from the menu. The Create Copy Operation window appears.

  5. Enter the first pair of parameters:

  6. Enter the second pair of parameters:

    On the Copy Operation tab, click Create and select Copy Operation from the menu. The Create Copy Operation window appears.

  7. Enter the third pair of parameters:

    On the Copy Operation tab, click Create and select Copy Operation from the menu. The Create Copy Operation window appears.

  8. Enter the fourth pair of parameters:

    On the Copy Operation tab, click Create and select Copy Operation from the menu. The Create Copy Operation window appears.

  9. Enter the fifth pair of parameters:

    On the Copy Operation tab, click Create and select Copy Operation from the menu. The Create Copy Operation window appears.

  10. Enter the sixth pair of parameters:

    On the Copy Operation tab, click Create and select Copy Operation from the menu. The Create Copy Operation window appears.

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

To add the second Assign activity to set payload for the InsertShipment service:

  1. In JDeveloper BPEL Designer, drag and drop the Assign activity from the Component Palette into the process diagram after the first Assign activity.

  2. Double-click the Assign activity to access the Edit Assign dialog box.

  3. Click the General tab to enter the name for the second Assign activity, such as 'SetPayload'.

  4. On the Copy Operation tab, click Create and select Copy Operation from the menu. The Create Copy Operation window appears.

  5. Enter the parameter information:

  6. Click Apply and then OK to complete the configuration of the second Assign activity.

    BPEL Process Diagram

    the picture is described in the document text

Run-Time Tasks for e-Commerce Gateway

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

  1. Deploy the BPEL process

  2. Test the BPEL process

  3. Verify records in Oracle Applications.

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.

To deploy the BPEL process

  1. Select the BPEL project in the Applications window.

  2. Right-click the project name, and then select Deploy > [Server Connection] > Deploy to Default Domain from the menu that appears.

    Deploying the BPEL Process

    the picture is described in the document text

  3. The BPEL process is compiled and deployed. You can check the progress in the Messages window.

    Messages Window

    the picture is described in the document text

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.

To test the BPEL process

  1. Navigate to Oracle Application Server 10g BPEL Console (http://<soaSuiteServerHostName>:<port>/BPELConsole).

    The BPEL Console login page appears.

    the picture is described in the document text

  2. Enter the username and password and click Login.

  3. The Oracle Enterprise Manager 10g BPEL Control appears. The list of deployed processes is shown under Deployed BPEL Processes.

    Deployed BPEL Processes

    the picture is described in the document text

  4. Click the BPEL process that you want to initiate. The Initiate page appears. 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.

    BPEL Console Initiate Page

    the picture is described in the document text

  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

To verify records in Oracle Applications

  1. Log in to Oracle Applications as the System Administrator.

    Oracle Applications Login Dialog Box

    the picture is described in the document text

  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 Applications to search for the relevant records that have been inserted.

    Querying Oracle Applications for a Record

    the picture is described in the document text