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 XML Gateway for BPEL Process Integration

This chapter covers the following topics:

Overview of XML Gateway

The OracleAS Adapter for Oracle Applications provides a bridge between Oracle Applications and third party applications. Inbound and outbound XML data is exchanged between Oracle Applications and third party applications through the XML Gateway.

Oracle XML Gateway provides a common, standards-based approach for XML integration between Oracle Applications and third party applications, both inside and outside your enterprise. XML is key to an integration solution, as it standardizes the way in which data is searched, exchanged, and presented thereby enabling interoperability throughout the supply chain.

Oracle XML Gateway is an XML messaging based integration infrastructure essentially for business partner integration which includes a set of services that allows easy integration between Oracle Applications and third party applications. Oracle Applications utilize the Oracle Workflow Business Event System to support event-based XML message creation and consumption.

OracleAS Adapter for Oracle Applications can be configured to use XML Gateway to interact with third party applications. The tight integration provided by open interface tables is not suitable for those scenarios where trading partners change frequently. XML Gateway is an ideal solution when you need to interact with third party applications that use open standards. Moreover, it is also suitable for scenarios where trading partners change frequently.

Standards-Based Messaging

As a provider of broad based business application solutions to support all industries, Oracle XML Gateway supports all Document Type Definition (DTD) based XML standards. The majority of the Oracle prebuilt messages delivered with Oracle Applications are premapped using the Open Application Group (OAG) standard. Any Oracle prebuilt message map may be remapped to your standard of choice using the XML Gateway Message Designer.

Integration Architecture

XML Gateway provides an application integration infrastructure that is flexible enough to accommodate the integration requirements of any application that needs to integrate with Oracle Applications. XML Gateway enables you to create an efficient and responsive supply chain that links all customers, factories, warehouses, distributors, carriers, and other trading partners. All these entities can seamlessly operate as a single enterprise.

Oracle XML Gateway supports both Business-to-Business (B2B) and Application-to-Application (A2A) initiatives. B2B initiatives include communicating business documents and participating in industry exchanges. An example of an A2A initiative is data integration with legacy and disparate systems.

XML Gateway enables bidirectional integration with Oracle Applications by allowing you to insert and retrieve data from Oracle Applications. The Oracle Applications adapter for XML Gateway supports inbound and outbound XML Gateway message processing. For XML Gateway inbound message processing, the inbound message will be placed in the ECX_INBOUND queue. Agent Listeners running on ECX_INBOUND would enable further processing by the Execution Engine. Oracle XML Gateway picks this XML message, does trading partner validation, and inserts data into Oracle Applications. For XML Gateway outbound message processing, the outbound message will be first enqueued to the ECX_OUTBOUND queue. Oracle BPEL PM listens to ECX_OUTBOUND queue for the message with the same correlation Id BPEL. The message will then be dequeued to retrieve outbound data and then the outbound map will be invoked to update Oracle Applications.

XML Gateway Integration Architecture

the picture is described in the document text

Message Queues

The XML Gateway uses queues specifically at two points in the process as well as employing a general error queue. The first point is at the transport agent level between the transport agent module and the XML Gateway. The second point is at the transaction level between base Oracle Applications products and the XML Gateway.

Inbound Queues

Inbound message queues are used for XML messages inbound into Oracle Applications. Inbound message queues are positioned between the Transport Agent and the Oracle Workflow Business Event System.

The messages must be formatted according to the XML Gateway envelope message format. The envelope message format is discussed under XML Gateway Envelope. Oracle Workflow Business Event System copies the inbound messages to the proper inbound Transaction Queue.

Outbound Queues

Outbound message queues are used for XML messages outbound from Oracle Applications. The outbound Message Queue is positioned between the XML Gateway and the Transport Agent.

The XML Gateway creates XML messages, then enqueues them on this queue. The Transport Agent dequeues the message and delivers it to the Trading Partner.

XML Gateway Envelope

In addition to the business document such as a purchase order or invoice in the XML Payload, a set of message attributes are also transmitted. Collectively, these attributes are called the XML Gateway envelope. The following table describes some of these attributes.

Envelope Attributes
Attribute Description
MESSAGE_TYPE Payload message format. This defaults to XML. Oracle XML Gateway currently supports only XML.
MESSAGE_STANDARD Message format standard as displayed in the Define Transactions form and entered in the Define XML Standards form. This defaults to OAG. The message standard entered for an inbound XML document must be the same as the message standard in the trading partner setup.
TRANSACTION_TYPE External Transaction Type for the business document from the Trading Partner table. The transaction type for an inbound XML document must be the same as the transaction type defined in the Trading Partner form.
TRANSACTION_SUBTYPE External Transaction Subtype for the business document from the Trading Partner table. The transaction subtype for an inbound XML document must be the same as the transaction subtype defined in the Trading Partner form.
DOCUMENT_NUMBER The document identifier used to identify the transaction, such as a purchase order or invoice number. This field is not used by the XML Gateway, but it may be passed on inbound messages.
PROTOCOL_TYPE Transmission Protocol as defined in the Trading Partner table.
PROTOCOL_ADDRESS Transmission address as defined in the Trading Partner table.
USERNAME USERNAME as defined in the Trading Partner table.
PASSWORD The password associated with the USERNAME defined in the Trading Partner table.
PARTY_SITE_ID The party site identifier for an inbound XML document must be the same as the Source Trading Partner location defined in the Trading Partner form.
ATTRIBUTE3 For outbound messages, this field has the value from the Destination Trading Partner Location Code in the Trading Partner table. For inbound messages, the presence of this value generates another XML message that is sent to the trading partner identified in the Destination Trading Partner Location Code in the Trading Partner table. This value must be recognized by the hub to forward the XML message to the final recipient of the XML Message.

Note: For more information, see Destination Trading Partner Location Code in the Oracle XML 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

PAYLOAD The XML message.

Parameters defined by the Application

The following parameters may be defined by the base application:

Parameters Not Used

The following parameters are not used:

Note: See Oracle XML Gateway User's Guide for details on the XML Gateway Execution Engine, Trading Partner validation, and so on. 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

Design-Time Tasks for XML Gateway Inbound Messaging

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 XML Gateway message map.

This section describes the process of configuring OracleAS Adapter for Oracle Applications to use XML Gateway message map. It also describes the tasks required to configure OracleAS Adapter for Oracle Applications using the Adapter Configuration Wizard in Oracle JDeveloper.

Prerequisites to Configure XML Gateway Inbound

Populating XML Gateway Header Variables

The MESSAGE_TYPE, MESSAGE_STANDARD, TRANSACTION_TYPE, TRANSACTION_SUBTYPE, and PARTY_SITE_ID are the mandatory header variables that you need to populate in order for the XML transactions to complete successfully.

Refer to Configuring the Assign Activity for more information.

Ensuring Agent Listeners Are Up and Running

You need to configure and schedule two listeners on the Oracle Applications side. These are the ECX Inbound Agent Listener and the ECX Transaction Agent Listener.

Use the following steps to configure these listeners in Oracle Applications:

  1. Log in to Oracle Applications with the responsibility of Workflow Administrator.

  2. Select the Workflow Administrator Web Applications link from the Navigator.

  3. Click the Workflow Manager link under Oracle Applications Manager.

  4. Click the status icon next to Agent Listeners.

  5. Configure and schedule the ECX Inbound Agent Listener and the ECX Transaction Agent Listener. Select the listener, and select Start from the Actions box. Click Go.

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

  1. Create a new BPEL project

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

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

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

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

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

    New BPEL Process Project

    the picture is described in the document text

Creating 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 create a partner link

  1. Click Services in the Component palette.

    Drag and drop Oracle Applications from the Component palette, into the border area of the process diagram. The Adapter Configuration Wizard Welcome page appears.

    Click Next.

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

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

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

    Specifying the Service Name

    the picture is described in the document text

  3. You can either create a new database connection or use an existing connection.

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

  4. Once you have completed a new database connection or selected an existing connection, you can add an XML Gateway inbound map by browsing through the message maps available in Oracle E-Business Suite.

  5. 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 XML Gateway to proceed.

    Click Add to open the Oracle Applications Module Browser.

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

    Specifying the XML Gateway Message Map

    the picture is described in the document text

    Note: The Oracle Applications Module Browser includes the various product families that are available in Oracle E-Business Suite. Each product family contains the individual products. Each product contains the business entities associated with the product. Business entities contain the various application modules that are exposed for integration. These modules are grouped according to the interface they provide.

    Navigate to Order Management Suite > Order Management >Sales Order > XML Gateway to select Inbound: Process Purchase Order XML Transaction (ONT_3A4R_OAG72_IN).

  7. Click OK to generate the XML schema.

    Adding the XML Schema

    the picture is described in the document text

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

    Completing the Partner Link Configuration

    the picture is described in the document text

  9. 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 adding the following two partner links for File Adapter:

  1. To pick up an XML file received from the third party application to get the XML message.

  2. To get the transaction information for the ECX header.

To add the first Partner Link for File Adapter to get the XML Message:

  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 GetXMLMsg. 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 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 clicking Project Schema Files > PROCESS_PO_007.xsd > PROCESS_PO_007.

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

    The GetXMLMsg Partner Link appears in the following BPEL process diagram:

    Adding the Partner Link for File Adapter

    the picture is described in the document text

To add the second Partner Link for File Adapter to get the transaction information for the XML header:

  1. Repeat Step 1 to Step 6 mentioned in the first partner link creation for File Adapter to create the second partner link called GetECXHeader.

  2. Enter the name of the file for the synchronous read file operation. For example, enter ecx_header_data.xml. Click Next. The Messages dialog box appears.

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

    From the Type Chooser window, expand the node by clicking Project Schema Files > SYSTEM_ECXMSG.xsd > SYSTEM_ECXMSG. Click OK to populate the selected schema location and element in the Messages dialog box.

    Populated Selected Schema and Element in the Messages Dialog Box

    the picture is described in the document text

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

    Adding a Partner Link

    the picture is described in the document text

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

    The GetECXHeader Partner Link appears in the following BPEL process diagram:

    Adding the Partner Link for File Adapter

    the picture is described in the document text

Configuring the Invoke Activity

This step is to configure three Invoke activities:

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

  2. To get the ECX Header properties details by invoking GetECXHeader partner link in an XML file.

  3. To enqueue the purchase order information to the ECX_INBOUND queue by invoking XMLGOrderInbound partner link in an XML file.

To add the first Invoke activity for a partner link to get XML message:

  1. In JDeveloper BPEL Designer, drag and drop the first Invoke activity from the Component Palette into the Activity box of the process diagram, between the Receive and Callback activities.

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

  3. Enter a name for the Invoke activity, and then click the Create icon next to the Input Variable field to create a new variable. The Create Variable dialog box appears.

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

  5. Enter a name for the Invoke activity, and then 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.

    Click Apply and then 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 get ECX Header properties:

  1. In JDeveloper BPEL Designer, drag and drop the second Invoke activity from the Component Palette into the Activity box of the process diagram, between the first Invoke activity and the Callback activity.

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

  3. Repeat Step 3 to Step 6 described in the first Invoke activity creation to complete the second Invoke activity.

To add the third Invoke activity for a partner link to enqueue PO information:

  1. In JDeveloper BPEL Designer, drag and drop the third Invoke activity from the Component Palette into the process diagram, between the second Invoke activity and the Callback activity.

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

  3. Repeat Step 3 to Step 6 described in the first Invoke activity creation to complete the third Invoke activity.

    The three Invoke activities appear in the process diagram.

    Adding Invoke Activities

    the picture is described in the document text

Configuring the Assign Activity

This step is to configure two Assign activities:

  1. To pass XML message as an input to the last Invoke activity for enqueuing message.

  2. To pass ECX header variables as input variables to the last Invoke activity in order to provide context information for Oracle Applications.

To add the first Assign activity to pass XML message as input to the Invoke activity:

  1. In JDeveloper BPEL Designer, drag and drop the Assign activity from the Component Palette into the Activity box of the process diagram, between the second and the third Invoke activities.

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

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

  5. Enter the first pair of parameters:

  6. The Edit Assign dialog box appears.

    Assign Parameters

    the picture is described in the document text

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

To add the second Assign activity to pass ECX header variables to the last Invoke activity:

  1. Add the second Assign activity by dragging and dropping the Assign activity from the Component Palette into the Activity box of the process diagram, between the SetXMLMsg Assign activity and the last Invoke activity.

    Adding an Assign Activity

    the picture is described in the document text

  2. Repeat Step 2 to Step 4 described in creating the first Assign activity to add the second Assign activity called 'SetECXHeader'.

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

  4. In the To navigation tree, select the Variables node and right-click on mouse to select 'Create Variable' from the drop-down list.

    Creating Variables

    the picture is described in the document text

    The Create Variable dialog box opens. Select the Message Type check box and click the Browse icon to open the Type Chooser window.

    Declaring Header Variables

    the picture is described in the document text

    Expand the Message Type node and select Partner Links > EnqueueMsg > EnqueueMsg.wsdl > Message Types > Header_msg. Click OK to return to the Create Copy Operation dialog box.

  5. The ECXHeader node appears in the Variables node of the To navigation tree. Expand the ECXHeader node and select ns1: Header > ns1: PayloadHeader.

  6. In the From navigation tree, select type Variable. Navigate to Variable > Process > Variables > Invoke_SynchRead_OutputVariable_1 > ECXMSG and select ns6:ECXMSG.

    The XPath field should contain your selected entry.

    Assigning Header Variables

    the picture is described in the document text

  7. Click OK to complete the configuration of the Assign activity.

  8. Modify the Invoke activity to pass the ECXHeader as input header variables you just declared and assigned through the Assign activity.

    1. Double-click the last Invoke activity to open the Invoke edit window.

      Editing Invoke Activity

      the picture is described in the document text

    2. Select Adapters tab and click the Browse Variables... icon next to the Input Header Variables field.

    3. Select ECXHeader from the Variable Chooser. Click OK.

      Entering Input Header Variables

      the picture is described in the document text

    4. The selected ECXHeader is now populated in the Input Header Variables field. Click Apply and then OK.

Run-Time Tasks for XML Gateway Inbound Messaging

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.

Note: Before deploying the BPEL Process for XML Gateway Inbound Interface, you should:

To deploy the BPEL process

  1. Select the BPEL project in the Applications window.

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

    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.

  4. Click the BPEL process that you want to initiate. The Initiate page appears. Enter the input values required by the process. You can also specify an XML file for the File Adapter to pick.

  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.

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

    If the BPEL process runs into an error, then a corresponding error code is returned. The following table lists the common error codes, their descriptions, and the fix that you can use for them.

    Error Codes for the BPEL Process
    Code No. Code Name Description Fix
    12400 APPS_MESSAGE_STANDARD_NOT_FOUND Message Standard not set in the header Set the Message Standard value in the header
    12401 APPS_TRANSACTION_TYPE_NOT_FOUND Transaction Type not set in the header Set the Transaction Type value in the header
    12402 APPS_TRANSACTION_SUBTYPE_NOT_FOUND Transaction Subtype not set in the header Set the Transaction Subtype value in the header
    12403 APPS_PARTY_SITE_ID_NOT_FOUND Party Site Id not set in the header Set the Party Site Id value in the header
    12404 APPS_MESSAGE_TYPE_NOT_FOUND Message Type not set in the header Set the Message Type value in the header
    12406 APPS_CONTEXT_ERROR Error in setting Apps Context Check the username and responsibility values
    12407 APPS_AUTHENTICATION_ERROR Invalid FND username/password Check the username and password values
    12408 APPS_UNKNOWN_EX Unknown error in Apps Interaction Check if all the header values are valid
    12409 APPS_XMLG_HEADER_NULL XML Gateway header is null Pass the required parameters in header

Verifying Records in Oracle Applications

Once the BPEL process is successfully initiated and completed, you can validate it through the relevant module in Oracle Applications. For example, you can check for the creation of a purchase order in Oracle Order Management.

To validate it in Oracle Order Management:

  1. Log in to the Forms-based Oracle Applications with the Order Management, Super User responsibility.

  2. Select Order Returns > Sales Order. The Sales Order Forms opens up.

  3. Search for an order by entering the order number in the Customer PO field. This brings up the details of a newly created order.

    Sales Orders

    the picture is described in the document text

    You can also select the Items tab for the item details.

Additionally, you can validate it from the Transaction Monitor. The Transaction Monitor is a tool for monitoring the status of inbound and outbound transactions originating from and going into Oracle Applications that have been processed by the XML Gateway and delivered or received by the Oracle Transport Agent. It shows a complete history and audit trail of these documents.

To validate it using Oracle Transaction Monitor, you need to log in to Oracle Applications with the Workflow Administrator Web Applications responsibility. Select Transaction Monitor to open the search window to search for the order.

Searching from the Transaction Monitor

the picture is described in the document text

Click Go to retrieve all XML inbound messages listed in the Inbound Search Results region.

Listing All XML Gateway Inbound Documents

the picture is described in the document text

See Oracle XML Gateway User's Guide for details on using the Transaction Monitor.

Design-Time Task for XML Gateway Outbound Messaging

This section discusses the design-time steps, for an XML Gateway outbound message, that are different from the design-time steps for an inbound message.

Prerequisites to Configure XML Gateway Outbound

Setting Up Correlation Identifier

For invoking an outbound XML Gateway message map, you need to set up the correlation identifier in Oracle Applications. The correlation identifier enables you to label messages meant for a specific agent, in case there are multiple agents listening on the outbound queue. The agent listening for a particular correlation picks up the messages that match the correlation identifier for the agent.

To set up the correlation identifier:

  1. Log in to Oracle Applications with the XML Gateway responsibility. The Navigator page appears.

  2. Click the XML Gateway link.

  3. Click the Define Lookup Values link under XML Gateway.

    XML Gateway Lookups

    the picture is described in the document text

  4. Enter COMM_METHOD for the Type field.

  5. Enter BPEL for the Code field.

    Oracle XML Gateway puts the correlation of BPEL when enqueueing the message on the ECX_OUTBOUND queue.

Setting Up XML Gateway Trading Partner

Once you have the correlation identifier set up correctly, you also need to ensure a valid outbound XML Gateway trading partner in the Trading Partner Setup form through XML Gateway responsibility. You want to have the Protocol Type field set to BPEL.

For example, a Trading Partner (such as 'Business World' with Site information '2391 L Street San Jose CA 95106' and partner type 'Customer') has the following details for an outbound transaction:

BPEL Process Creation Flow

The following procedure is required to accomplish the design-time task.

  1. Create a new BPEL project

  2. Create a Partner Link

  3. Add a Receive activity

  4. Add a Partner Link for File Adapter

  5. Add an Invoke activity

  6. Add an 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 Name field, enter a descriptive name, such as XMLGOutbound.

    Keep the default selection Use Default Project Settings unchanged.

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

    Specifying New BPEL Project Settings

    the picture is described in the document text

  9. Click Finish.

    An empty BPEL process is created.

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

Adding a Partner Link

You need to add a partner link for the outbound XML message in order for the Receive activity to dequeue it later.

To add a partner link

  1. Click Services in the Component palette.

    Drag and drop Oracle Applications from the BPEL Services list into the right part 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, GetAck.

    Click Next. The Service Connection dialog appears.

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

  4. Once you have created a new connection or selected an existing connection, you can add an outbound message map by browsing through the list of message maps available in Oracle E-Business Suite.

    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 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 XML Gateway to proceed.

    Click Add in the Application Interface dialog to open the Oracle Applications Module Browser.

  5. 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 API from The Oracle Applications Module Browser

    the picture is described in the document text

    Note: The Oracle Applications Module Browser includes the various product families that are available in Oracle Applications. Each product family contains the individual products. Each product contains the business entities associated with the product. Business entities contain the various application modules that are exposed for integration. These modules are grouped according to the interface they provide.

    Navigate to Other Interfaces > Custom Objects >XML Gateway Maps> Outbound to select an outbound map ECX_CBODO_OAG72_OUT_CONFIRM.

    Click OK.

  6. The Application Interface dialog box appears with the selected XML schema.

    Application Interface Dialog

    the picture is described in the document text

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

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

Adding a Receive Activity

When configuring the OracleAS Adapter for Oracle Applications to use an outbound XML Gateway map, you need to configure the Receive activity for the associated partner link. The Receive activity dequeues the outbound XML messages.

To configure the Receive activity

  1. In JDeveloper BPEL Designer, drag and drop the Receive activity from the Component Palette into the process map.

  2. Link the Receive activity to the partner link GetAck you created earlier.

    The Receive dialog box appears.

  3. Enter an appropriate name for the Receive activity.

    The Dequeue Operation is automatically selected since the partner link has been configured with an outbound XML Gateway map.

  4. Specify a Variable to receive the message data from the partner link by clicking the Create icon to the right of the Variable field. The Create Variable dialog box appears.

    Click OK to accept the default name.

  5. Select the Create Instance check box.

    Editing the Receive Activity

    the picture is described in the document text

  6. Click Apply and then OK.

    The Receive activity is added to the BPEL process diagram.

    the picture is described in the document text

    Note: You can define a Header Variable under the Adapters tab of the Receive dialog box. This header variable is populated with context information from the outbound XML message. Values for fields like MESSAGE_TYPE, MESSAGE_STANDARD and trading party information like PARTY_SITE_ID are returned through this variable.

Adding a Partner Link for File Adapter

Use this step to configure a partner link by writing the purchase order acknowledgement to an XML file.

To add a Partner Link for File Adapter:

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

  2. The Service Name dialog box appears.

    Specifying the Service Name

    the picture is described in the document text

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

  4. Click Next. The Operation dialog box appears.

    Specifying the Operation

    the picture is described in the document text

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

    Click Next to access the File Configuration dialog box.

    Configuring the Output File

    the picture is described in the document text

  6. For the Directory specified as field, select Logical Path. Enter directory path in the Directory for Outgoing Files field, and specify a naming convention for the output file, for example, POAck%yyMMddJJmmss%.xml.

  7. Confirm the default write condition: Number of Messages Equals 1. Click Next. The Messages dialog box appears.

  8. Select the Browse check box to locate the schema location and schema element.

    The Type Chooser dialog box appears. Expand the path by selecting Project Schema Files > CONFIRM_BOD_002.xsd. Select CONFIRM_BOD_002 as the element.

    Type Chooser

    the picture is described in the document text

    Click OK to populate the selected schema location and element.

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

    Completing the Partner Link Configuration

    the picture is described in the document text

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

    The WriteAck Partner Link appears in the BPEL process diagram.

    Adding the Partner Link for File Adapter

    the picture is described in the document text

Adding an Invoke Activity

This step is to configure an Invoke activity to send the purchase order acknowledgement that is received from the Receive activity to the WriteAck partner link in an XML file.

To add an Invoke activity:

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

  2. Link the Invoke activity to the WriteAck service. The Invoke activity will send event data to the partner link. The Edit Invoke dialog box appears.

    Editing the Invoke Activity

    the picture is described in the document text

  3. Enter a name for the Invoke activity, and click the Create icon next to the Input Variable field to create a new variable. The Create Variable dialog box appears.

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

    Click Apply and then OK in the Edit Invoke dialog box to finish configuring the Invoke activity.

    The Invoke activity appears in the process diagram.

    the picture is described in the document text

Adding an Assign Activity

Use this step to pass the purchase order acknowledgement details from the Receive activity to the Invoke activity.

To add an Assign activity:

  1. In JDeveloper BPEL Designer, drag and drop the Assign activity from the Component Palette into the Activity box of the process diagram, between the Receive activity and 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. On the Copy Operation tab, click Create and select Copy Operation from the menu. The Create Copy Operation window appears.

  4. In the From navigation tree, select type Variable. Navigate to Variable > Process > Variables > Receive_DEQUEUE_InputVariable > CONFIRM_BOD_004 and select ns3:CONFIRM_BOD_004. The XPath field should contain your selected entry.

  5. In the To navigation tree, select type Variable. Navigate to Variable > Process > Variables > Invoke_Write_InputVariable > CONFIRM_BOD_004 and select ns3:CONFIRM_BOD_004. The XPath field should contain your selected entry.

    Specifying Assign Parameters

    the picture is described in the document text

  6. Click OK.

    Click Apply and then OK in the Edit Assign dialog box to complete the configuration of the Assign activity.

Run-Time Task for XML Gateway Outbound Messaging

After designing the BPEL process, you can compile, deploy and test it.

  1. Deploy the BPEL process

  2. Test the BPEL process

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, and then select Deploy > [Server Connection] > Deploy to Default Domain from the menu that appears.

    Deploy the BPEL Process

    the picture is described in the document text

  3. The BPEL process is compiled and deployed. You can check if the deployment is successful in the Apache Ant log.

    the picture is described in the document text

Testing the BPEL Process

In Oracle Applications, you can check for outbound transactions that have been processed by the XML Gateway and delivered to the Transaction Agent by using the Transaction Monitor. You can also use the Transaction Monitor to resend an outbound document if necessary.

Note: For details on using the Transaction Monitor, see Oracle XML Gateway User's Guide.

If you have used a File Adapter to write outbound messages from Oracle Applications to files, you can check the output directory location for the presence of these files after the BPEL process has run.

To validate the design-time tasks created earlier, you can log in to Oracle E-Business Suite to manually create and book the order as well as generate the order acknowledgement by submitting a Workflow Background Process concurrent request.

To manually test the BPEL process:

  1. Log in to Oracle Applications with the XML Gateway responsibility.

    This is to ensure that the XML Gateway trading partner is set up correctly so that a purchase order can have a valid customer that has been defined.

  2. Select Define Trading Partner from the navigation menu to access the Trading Partner Setup window.

  3. Enter the header values in the Trading Partner Setup form as follows:

  4. Enter the following trading partner details:

  5. Save your work.

To successfully generated PO Acknowledgement, you need to create an order and then manually book the order through Order Management.

Use the following steps to create an order and then manually book the order:

  1. Switch to Order Management Super User, Vision Operations (USA) responsibility and select Customer > Standard from the navigation menu to open the Enter Customer form.

  2. Search on the 'Business World' in the Name field and click Find.

  3. Select the Business World with the following information from the search results:

  4. Select row with the following entries:

  5. Click Details to open the Customer Information page.

  6. Click Details in the row with the Business World with Address '2391 L Street, San Jose, CA 95106' and Country 'United States of America'. This opens the Customer Account page.

  7. Enter 'BWSANJOSE' in the EDI Location field.

  8. In the Business Purposes tab, create a new row with the following values:

    Save your work.

Use the following steps to generate acknowledgement for an already created order:

  1. Log in to Oracle Applications with the Order Management Super User, Vision Operations (USA) responsibility. Select Order Returns > Sales Order to open the Sales Order form.

  2. Retrieve the order that you have created earlier by entering the order ID in the Customer PO field, such as order_xmlg_008.

  3. Click Book Order to book the order.

    Booking an Order

    the picture is described in the document text

  4. Switch to the System Administrator responsibility and select Request > Run.

  5. Select Single Request and click OK.

  6. Enter the following information in the Submit Request form:

    Specifying Parameters

    the picture is described in the document text

  7. Click Submit to submit 'send acknowledgement' request.

  8. View your request by entering the request ID to ensure its status is 'Success'.

Validating Using Oracle Transaction Monitor

To validate it using Oracle Transaction Monitor, you need to log in to Oracle Applications with the Workflow Administrator Web Applications responsibility. Select Transaction Monitor to open the search window to search for the order.

Searching from the Transaction Monitor

the picture is described in the document text

Validating Using Oracle BPEL Console

Log in to Oracle BPEL Console to confirm that the XMLGOutbound process has been deployed. This process is continuously polling the ECX_OUTBOUND queue for purchase order acknowledgement.

To verify, select the instance of your deployed process. This opens up in the Instances tab of your selected BPEL process.

Click on the Audit Tab to view the Receive activity. Click the view xml document link to open the XML file received. Please note that the Reference ID in the XML file represents the Customer PO in the Sales Orders form.

Viewing XML File for the Receive Activity

the picture is described in the document text

On approval of the order, Oracle E-Business Suite triggers the workflow that creates the Purchase Order Acknowledgement flow and sends out the PO Acknowledgement as an XML file. The workflow delivers the Confirm BOD as the PO Acknowledgement to the ECX_OUTBOUND queue for delivery to the other system.

On the other hand, Oracle BPEL PM listens to the ECX_OUTBOUND queue for the message with the correlation Id = “BPEL” which is the same id for this outbound message. The Confirm BOD as the PO Acknowledgement is written as XML file using File Adapter.

Since the BPEL process is deployed, the process is continuously polling the ECX_OUTBOUND queue for PO acknowledgement. It also writes PO Acknowledgement in the directory you specified after receiving from XML Gateway ECX_OUTBOUND queue.

Go to the directory you specified for the write operation, such as outputDir logical location (typically c:\temp) where the File Adapter has placed the file after writing the PO Acknowledgement in an XML file (POAck060719175318.xml).

Open this POAck060719175318.xml file. You should find the Reference ID as order_xmlg_008 (the order booked) for which the acknowledgement is generated.

Validating the Output File

the picture is described in the document text

Troubleshooting and Debugging

If you experience problems with your Oracle XML Gateway 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 for XML Gateway using the BPEL Process Manager.

To enable debugging:

  1. Log in to your BPEL Process Manager domain.

  2. Select yourdomain.collaxa.cube.ws

  3. Select Debug.

  4. Enable FND Logging to debug XML Gateway transactions.

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.