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 Concurrent Programs for BPEL Process Integration

This chapter covers the following topics:

Overview of Concurrent Programs

A concurrent program is an instance of an execution file. Concurrent programs use a concurrent program executable to locate the correct execution file. Several concurrent programs may use the same execution file to perform their specific tasks, each having different parameter defaults. Concurrent manager runs in the background waiting for a concurrent program to be submitted. As soon as a concurrent program is submitted, it is put into an execution queue by concurrent manager. Concurrent manager also manages the concurrent execution of concurrent programs.

Concurrent programs associated with the Open Interface Table move the data from interface table to base tables. While other concurrent programs execute the business logic and application-level processing for Oracle E-Business Suite.

Design-Time Tasks for Concurrent Programs

This section describes how to configure the OracleAS Adapter for Oracle Applications to use concurrent programs. It describes the tasks required to configure OracleAS Adapter for Oracle Applications using the Adapter Configuration Wizard in Oracle JDeveloper.

Prerequisites to Configuring Concurrent Programs

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

Populating Applications Context Header Variables

You need to populate certain variables in the SOA Suite to provide context information required in 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 parameters including Username, Responsibility, Responsibility Application, Security Group, and NLS Language. If the values for the new header parameters 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 values. The context information can be specified by configuring an Assign activity before the Invoke activity in the BPEL PM.

Detailed instructions on how to assign header variables, see Design-Time Tasks for Assigning Header Variables.

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. Configure the Invoke activity

  4. Configure the Assign activity

Creating 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 BPEL Process 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 New BPEL Project Settings

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

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.

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 and the Service Name dialog box appears.

  3. Enter the following information:

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

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

      Specifying the Service Name

      the picture is described in the document text

      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 add a concurrent program by browsing through the list of concurrent programs 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 OracleAS 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, OracleAS 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 Tables/Views/APIs/Concurrent Programs to proceed.

    Click Add to open the Oracle Applications Module Browser.

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

    Specify a Concurrent Program

    the picture is described in the document text

    Navigate to Order Management Suite (OM_PF) >Order Management (ONT) > Sales Order (ONT_SALES_ORDER) > OpenInterfaces > Order Management Sales Orders Open Interface > ConcurrentPrograms to select a concurrent program OEOIMP (OEOIMP).

    Note: You can also search for a concurrent program by entering the name of the program in the Object Name field. Select the CP check box, and then click Search.

  8. Click OK. The Application Interface page appears.

    Application interface

    the picture is described in the document text

  9. Click Next and then click Finish to complete the process of configuring Adapter for Oracle Applications.

    The wizard generates the WSDL file corresponding to the XML schema. This WSDL file is now available for the partner link.

    Create Partner Link

    the picture is described in the document text

  10. Click Apply and 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 Invoke activity.

To configure the Invoke activity

  1. Drag and drop the Invoke activity from the Component Palette into the process diagram.

    Adding an Invoke Activity

    the picture is described in the document text

  2. Link the Invoke activity to the ImportCP partner link. This opens the Invoke dialog box. The General tab is selected by default.

    Notice that the Operation field is automatically selected with the concurrent program that you chose.

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

    Select Global Variable and click OK.

    Creating the Input Variable

    the picture is described in the document text

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

    Select Global Variable and click OK.

    General Tab of the Invoke Activity

    the picture is described in the document text

  5. In the Invoke dialog box, click Apply and then OK.

    Note: You can define an Input Header Variable under the Adapters tab of the Invoke dialog box. This variable can be used to provide context information for Oracle Applications in supporting multiple languages and multiple organization setups.

    To Create the Header Variable:

    1. Click 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. In the Create Variable dialog box, enter header in the Name field.

    4. Select Message Type and click 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 including Username, Responsibility, ORG_ID, Responsibility Application, Security Group, and NLS Language elements, 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.

      Viewing Header Variable Structure

      the picture is described in the document text

    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

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 Activity box of the process diagram before the Invoke activity.

    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 then 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 ImportCP service:

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

    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 '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 following information to the Assign activity:

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

Run-Time Tasks for Concurrent Programs

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 must 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, 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, 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 BPEL 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 about 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. In the Find Requests form, search for the request by entering the Request ID that you got from the audit trail, and 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

Troubleshooting and Debugging

If you experience problems with your concurrent program integration, you can take the following troubleshooting steps:

If you still experience problems with your integration, you can enable debugging.

Enabling Debugging

You can enable debugging using the BPEL Process Manager.

To enable debugging:

  1. Log into your BPEL Process Manager domain.

  2. Select yourdomain.collaxa.cube.ws

  3. Select Debug.

Debugging information is output to the log file for your domain. To examine the log file in the BPEL Process Manager, navigate to Home > BPEL Domains > yourdomain > Logs. The log file is yourdomain.log.