Skip Headers

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

Using XML Gateway

This chapter covers the following topics:

Overview of XML Gateway

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

Oracle 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 from Oracle E-Business Suite. The retrieved data can be passed to trading partners or consumers who subscribed to the message.

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

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 other XML Gateway information. This guide is part of the Oracle E-Business Suite Online Documentation Library which can be accessed on the Oracle Technology Network (OTN).

Design-Time Tasks for XML Gateway Inbound Messaging

This section describes configuring the Adapter for Oracle Applications to use XML Gateway. It describes the tasks required to configure Adapter for Oracle Applications using the Adapter Configuration Wizard in Oracle JDeveloper.

SOA Composite Application with BPEL Process Scenario

Take the XML Gateway Inbound Process PO XML Transaction as an example to explain the BPEL process creation. In this example, the XML Gateway inbound message map is exposed as a Web service through PROCESS_PO_007 inbound map. It allows sales order data including header and line items to be inserted into Order Management system while an associated purchase order is created.

When a purchase order is sent by a trading partner, the purchase order data is used as input to the BPEL process along with ECX Header properties such as jca.apps.ecx.TransactionType. The BPEL process then pushes this purchase order in 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 order data to Order Management Application.

When the SOA Composite application with BPEL process has been successfully executed after deployment, you should get the same order information inserted into the Order Management table once a purchase order is created.

Prerequisites to Configure XML Gateway Inbound

Setting XML Gateway Header Properties

You need to populate certain variables in the BPEL process in order to provide context information for Oracle Applications. This is accomplished by setting individual fields as header properties from the SYSTEM.ECXMSG object used in earlier releases.

The header properties can include, for example, jca.apps.ecx.TransactionType, jca.apps.ecx.TransactionSubtype, jca.apps.ecx.PartySiteId, jca.apps.ecx.MessageType, jca.apps.ecx.MessageStandard, jca.apps.ecx.DocumentNumber that you need to populate for the XML transaction to complete successfully.

These header property values can be defined through the Properties tab of an Invoke activity. See Configure the Invoke activity for more information.

Setting Up XML Gateway Trading Partner

You need to ensure that you have defined a valid inbound XML Gateway trading partner in the Trading Partner Setup form through XML Gateway responsibility.

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

Ensuring Agent Listeners Are All Up and Running

You also 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, ECX Transaction Agent Listener, and the Workflow Deferred Agent Listener. Select the listener, and select Start from the Actions box. Click Go.

Based on the XML Gateway Inbound Process PO XML Transaction business scenario, the following design-time tasks are discussed in this chapter:

  1. Create a new SOA Composite application with BPEL process.

  2. Create a partner link.

  3. Add partner links for file adapter.

  4. Configure Invoke activities.

  5. Configure an Assign activity.

Creating a New SOA Composite Application with BPEL Process

To create a new SOA Composite application with BPEL process

  1. Launch Oracle JDeveloper.

  2. Click New Application in the Application Navigator.

    The Create SOA Application - Name your application page is displayed.

    The Create SOA Application - Name your application Page

    the picture is described in the document text

  3. Enter an appropriate name for the application in the Application Name field and select SOA Application from the Application Template list.

    Click Next. The Create SOA Application - Name your project page is displayed.

    The Create SOA Application - Name your project Page

    the picture is described in the document text

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

  5. In the Project Technologies tab, ensure that SOA is selected from the Available technology list to the Selected technology list.

    Click Next. The Create SOA Application - Configure SOA settings page is displayed.

    The Create SOA Application - Configure SOA settings Page

    the picture is described in the document text

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

    The Create BPEL Process page is displayed.

    The Create BPEL Process Page

    the picture is described in the document text

  7. Enter an appropriate name for the BPEL process in the Name field. For example, POInboundXMLGateway.

    Select Asynchronous BPEL Process in the Template field. Click OK.

    An asynchronous BPEL process is created with the Receive and Reply activities. The required source files including bpel and wsdl, using the name you specified (for example, POInboundXMLGateway.bpel and POInboundXMLGateway.wsdl) and composite.xml are also generated.

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 add a partner link

  1. Click BPEL Services in the Component palette.

    Drag and drop Oracle Applications from the BPEL Services list into the right Partner Link swim lane of the process diagram. The Adapter Configuration Wizard Welcome page appears. Click Next.

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

    Click Next. The Service Connection dialog appears.

    Specifying a Database Service Connection

    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 Applications is running.

  4. Once you have completed a new connection or selected an existing connection, you can add an XML Gateway inbound map by browsing through the list of APIs available in Oracle Applications.

    Click Next.

    For Oracle E-Business Suite Release 12:

    If you are connecting to Oracle E-Business Suite Release 12, then the IREP File not present dialog appears indicating that Adapter could not find the Oracle Integration Repository data file corresponding to the database you are connecting in your workspace. Absence of the data file would make browsing or searching of Integration Repository tree considerably slow. You can choose to extract the data file and create a local copy of the Integration Repository data file. Once it is created successfully, Adapter will pick it up automatically next time and retrieve data from your local Integration Repository.

    You can select one of the following options:

    For Oracle E-Business Suite Release 11.5.9:

    If you are connecting to an Oracle E-Business Suite Release 11.5.9 instance, you must select the interface type in the Adapter Configuration Wizard. Select XML Gateway to proceed.

    Click Get Object 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 Oracle Application Adapter, organized in a tree hierarchy.

    Specify an Inbound XML Gateway Message Map 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 Order Management Suite > Order Management >Sales Order > XML Gateway to select Inbound: Process Purchase Order XML Transaction (ONT_3A4R_OAG72_IN).

  6. Click OK.

    Adapter Configuration Wizard - Application Interface Page

    the picture is described in the document text

  7. Click Next, 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.

    After adding and configuring the partner link, the next task is to configure the BPEL process.

    Partner Link Information

    the picture is described in the document text

Adding a Partner Link for the File Adapter

If you are configuring an inbound message, then you would need to add another partner link for the file adapter. This allows the inbound message to pick up an XML file received from the third party application. The data is inserted into Oracle Applications through the partner link that was configured earlier.

To add a partner link for the file adapter to get the XML Message:

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

    Drag and drop File Adapter from the BPEL Services list into the right Partner Link swim lane of the process diagram. The Adapter Configuration Wizard Welcome page appears.

    Click Next.

  2. In the Service Name page, enter a name for the file adapter service, for example, getOrderXML.

  3. Click Next. The Adapter Interface page appears.

    Specifying the Adapter Interface

    the picture is described in the document text

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

  4. In the Operation page, specify the operation type. For example, select the Synchronous Read File radio button. This automatically populates the Operation Name field.

    Specifying the Operation

    the picture is described in the document text

    Click Next to access the File Directories page.

  5. Select the Logical Name radio button and specify directory for incoming files, such as inputDir.

    Ensure the Delete files after successful retrieval check box is not selected.

    Configuring the Input File

    the picture is described in the document text

    Click Next to open the File Name page.

  6. Enter the name of the file for the synchronous read file operation. For example, enter order_data_xmlg.xml.

    Note: Use the following information to edit composite.xml to specify the physical directory for the File Adapter:

    <property name="inputDir" type="xs:string" many="false" override="may">/usr/tmp/</property>

    Click Next. The Messages page appears.

  7. Select the 'browse for schema file' icon to open the Type Chooser window.

    Expand the node by clicking Project Schema Files > PROCESS_PO_007.xsd > PROCESS_PO_007.

    The selected schema information will be automatically populated in the URL and Schema Element fields.

    Specifying Message Schema

    the picture is described in the document text

  8. Click Next and then Finish. The wizard generates the WSDL file corresponding to the partner link. The main Create Partner Link dialog box appears, specifying the new WSDL file getOrderXML.wsdl.

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

    The getOrderXML Partner Link appears in the BPEL process diagram.

Configuring the Invoke Activities

After adding and configuring the partner link, the next task is to configure the BPEL process. You can start by configuring the Invoke process activity to enqueue the XML Gateway inbound messages and set XML Gateway header properties.

Based on the scenario described earlier, you need to configure the following two Invoke activities:

  1. To get the XML message details from the input XML file through synchronous read operation by invoking the getOrderXML partner link.

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

    The ECX Header properties for the XML Gateway inbound service can also be set through the Invoke activity.

To configure the first Invoke activity

  1. In JDeveloper BPEL Designer, select BPEL Activities and Components in the component palette. Drag and drop the first Invoke activity into the center swim lane of the process diagram, between the receiveInput and callbackClient activities.

  2. Link the Invoke activity to the getOrderXML partner link service.

    Creating an Invoke Activity

    the picture is described in the document text

  3. In the Edit Invoke dialog, enter a name for the Invoke activity in the General tab.

    The value of the Operation field is automatically selected based on the associated partner link. For example, this Invoke activity is to invoke a File Adapter service to synchronize read an input XML file; thus, the SynchRead is automatically populated in the Operation field.

  4. Click the Create icon next to the Input Variable field. The Create Variable dialog appears.

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

  5. In the Edit Invoke dialog, click the Create icon next to the Output Variable field to create a new variable. The Create Variable dialog box appears.

    Creating the Input Variable

    the picture is described in the document text

    Select Global Variable and enter a name for the variable. You can also accept the default name. Click OK to return to the Edit Invoke dialog.

    The Edit Invoke Dialog

    the picture is described in the document text

  6. Click Apply and then OK.

To configure the second Invoke activity

  1. In JDeveloper BPEL Designer, select BPEL Activities and Components in the component palette. Drag and drop the first Invoke activity into the center swim lane of the process diagram, between the first Invoke activity and callbackClient activity.

  2. Link the Invoke activity to the XMLGatewayOrderInbound partner link service.

  3. In the Edit Invoke dialog, enter a name for the Invoke activity in the General tab.

    The value of the Operation field is automatically selected based on the associated partner link. Since this Invoke activity is associated with an inbound message map partner link, the Enqueue operation is selected.

  4. Click the Create icon next to the Input Variable field. The Create Variable dialog appears.

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

    Click Apply.

    The Edit Invoke Dialog

    the picture is described in the document text

  5. Setting ECX Header Message Properties

    You need to enter appropriate XML Gateway header property values in order to pass individual message properties required for XML transaction to complete successfully.

    Use the following steps to set ECX header message properties:

    1. Click the Properties tab in the Invoke dialog box. You will find all predefined normalized message properties.

      Locate XML Gateway specific properties with prefix jca.apps.ecx from the Properties tab.

      Locating XML Gateway Related Properties

      the picture is described in the document text

    2. Click a property first (such as jca.apps.ecx.TransactionType) from the Properties tab to enable the Adapter Property Value icon.

    3. Click the icon to open the Adapter Property Value dialog.

    4. Select the 'Expression' button as the message type.

    5. Enter a property value for the selected property. For example, enter 'PO' for the property jca.apps.ecx.TransactionType.

      Entering a Selected Property Value

      the picture is described in the document text

      Click OK.

    6. Repeat Step 2 to Step 5 to set the following property values:

      • jca.apps.ecx.MessageType: 'XML'

      • jca.apps.ecx.TransactionSubType: 'PROCESS'

      • jca.apps.ecx.PartySiteId: 'BWSANJOSE'

      • jca.apps.ecx.MessageType: 'XML'

      • jca.apps.ecx.MessageStandard: 'OAG'

      • jca.apps.ecx.DocumentNumber: 'order_xml_01'

      Note: In earlier releases, XML Gateway header variables including MESSAGE_TYPE, MESSAGE_STANDARD, TRANSACTION_TYPE, TRANSACTION_SUBTYPE, DOUCMENT_NUMBER, and PARTY_SITE_ID are contained in the SYSTEM.ECXMSG object. Adapter for Oracle Applications now normalizes the SYSTEM.ECXMSG object to create and set each individual message property through the Properties tab of the Invoke activity. These header properties are required for the XML transaction to complete successfully.

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

    Note: If you have configured a partner link for outbound messages from Oracle Applications, then you need to configure a Receive activity in place of the Invoke activity. The Receive activity is used to dequeue the XML Gateway outbound messages.

Configuring the Assign Activity

Use the Assign activity to pass the output of getOrderXML service as an input to the XMLGatewayOrderInbound service.

To add an Assign activity:

  1. In JDeveloper BPEL Designer, select BPEL Activities and Components in the component palette. Drag and drop the Assign activity into the center swim lane of the process diagram between the two Invoke activities you just created earlier.

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

    Click the General tab to enter a name for the Assign activity. For example, SetOrderXML.

  3. Select the Copy Operation tab, click the 'Plus' sign icon and choose Copy Operation from the menu. The Create Copy Operation window appears.

    Specifying a Copy Operation Action

    the picture is described in the document text

  4. Enter the following information:

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

    The following diagram illustrates the complete BPEL process:

    BPEL Process Diagram

    the picture is described in the document text

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

    Note: Click the Source tab of composite.xml to enter a value for the inputDir (such as /usr/tmp).

    <property name="inputDir" type="xs:string" many="false" override="may">/usr/tmp</property>

    Oracle JDeveloper composite Diagram

    the picture is described in the document text

Run-Time Tasks for XML Gateway Inbound Messaging

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

  1. Deploy the SOA Composite application with BPEL process

  2. Test the SOA Composite application with BPEL process

  3. Verify records in OracleE-Business Suite

Deploying the SOA Composite Application with BPEL Process

You must deploy the SOA Composite application with BPEL process before you can run it. The SOA Composite is first compiled, and then deployed to the application server (Oracle WebLogic Server) that you have established the connection.

Prerequisites

Before deploying the SOA Composite using Oracle JDeveloper, you must ensure the following:

To deploy the SOA Composite application with BPEL process

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

  2. Right-click the project name. Select Deploy > [project name] > [serverConnection] from the menu that appears.

    Deploying the SOA Composite with BPEL Process

    the picture is described in the document text

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

Testing the SOA Composite with BPEL Process

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

To test the deployed SOA Composite with BPEL process

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

    the picture is described in the document text

  2. Enter username (such as weblogic) and password and click Login to log in to a farm.

    You may need to select an appropriate target instance farm if there are multiple target Oracle Enterprise Manager Fusion Middleware Control Console farms.

  3. From the Farm base domain, expand the SOA > soa-infra to navigate through the SOA Infrastructure home page and menu to access your deployed SOA composite applications running in the SOA Infrastructure for that managed server.

    Note: The Farm menu always displays at the top of the navigator. As you expand the SOA folder in the navigator and click the links displayed beneath it, the SOA Infrastructure menu becomes available at the top of the page.

    Click the SOA Composite application that you want to initiate (such as 'POInboundXMLGateway') from the SOA Infrastructure.

    Click Test at the top of the page.

  4. The Test Web Service page for initiating an instance appears. You can specify the XML payload data to use in the Input Arguments section.

    Enter the input string required by the process and click Test Web Service to initiate the process.

    Testing Web Service

    the picture is described in the document text

    The test results appear in the Response tab upon completion.

  5. Click the Instances tab. The SOA Composite application instance ID, name, conversation ID, most recent known state of each instance since the last data refresh of the page are displayed.

    In the Instance ID column, click a specific instance ID to show the message flow through the various service components and binding components. The Flow Trace page is displayed.

    In the Trace section, you should find the sequence of the message flow for the service binding component (poinboundxmlgateway_client_ep), BPEL component (POInboundXMLGateway), and reference binding components (getOrderXML and XMLGatewayOrderInbound). All involved components have successfully received and processed messages.

    If any error occurred during the test, you should find it in the Faults section.

  6. Click your BPEL service component instance link (such as POInboundXMLGateway) to display the Instances page where you can view execution details for the BPEL activities in the Audit Trail tab.

    Click the Flow tab to check the BPEL process flow diagram. Click an activity of the process diagram to view the activity details and flow of the payload through the process.

Verifying Records in Oracle E-Business Suite

Once the BPEL process is successfully initiated and completed, you can validate it through the relevant module in Oracle E-Business Suite applications.

For example, you can validate it using Oracle Transaction Monitor to ensure the process is successfully completed, and then import the order to Order Management application. You can then verify it in Oracle Order Management to ensure the order does exist.

To validate it Using Oracle Transaction Monitor

Additionally, you can also 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 E-Business Suite 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.

You can navigate to the Transaction Monitor page using the Workflow Administrator Web responsibility. The Transaction Monitor provides the following:

Use the following steps to validate in Oracle Transaction Monitor:

  1. Log on to Oracle Applications with the Workflow Administrator Web Applications responsibility. Select Transaction Monitor to open the search window to search for the order.

  2. Select the Inbound Messages radio button.

    Searching from the Transaction Monitor

    the picture is described in the document text

    Enter the following information in the search window:

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

    Confirm that transaction for 'order_xml_01' has the 'Success' status.

To import the order to Oracle Order Management:

  1. Log on to the Forms-based Oracle Applications with the Order Management Super User, Vision Operations (USA) responsibility.

  2. Select Orders, Returns : Import Orders > Order Import Request. The Order Import Request window is displayed along with the Parameters dialog.

    Order Import Request

    the picture is described in the document text

  3. Click OK in the parameters dialog. The Order Import request name is populated automatically in the Import Request window.

  4. Click Submit to submit the request. This displays a concurrent request number. Record the request number, but click No in the Decision dialog that you will not submit another request.

  5. From the application menu, select View >Requests to open the Find Requests window.

  6. Enter the request number you recorded earlier and click Find.

    This would show the status of Order Import request. It should be success and the order should be created in Order Management application.

To validate it in Oracle Order Management:

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

  2. Select Order Returns > Sales Order. Sales Order Forms would open up.

  3. Search for an order by entering the order number (order_xml_01) in the Customer PO field. This would bring up the details of a newly created order using XML Gateway inbound map.

    Sales Orders

    the picture is described in the document text

    You can also select the Items tab for item details.

Design-Time Task for XML Gateway Outbound Messaging

For an outbound XML Gateway Map interface, since an outbound message is first enqueued to the ECX_OUTBOUND queue, Oracle BPEL PM listens to ECX_OUTBOUND queue for the message with the same correlation Id. The message will then be dequeued to retrieve outbound data from Oracle E-Business Suite. The retrieved data can be passed to trading partners or consumers who subscribed to the message.

SOA Composite Application with BPEL Process Scenario

Take XML Gateway outbound interface PO acknowledgement XML Transaction as an example. The XML Gateway outbound interface is exposed as a Web service through ECX_CBODO_OAG72_OUT_CONFIRM outbound map.

When a purchase order is created and approved, on approval of the purchase order, a workflow will be triggered which 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 ECX_OUTBOUND queue for delivery to the other system.

The correlation Id for this message is set to “BPEL” and the Oracle BPEL PM listens to ECX_OUTBOUND queue for the message with the correlation Id “BPEL”. Confirm BOD as the PO Acknowledgement is written as an output XML file using File Adapter.

Prerequisites to Configure XML Gateway Outbound

Setting Up Correlation Identifier

For invoking an outbound 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 to open the XML Gateway Lookups form.

    XML Gateway Lookups

    the picture is described in the document text

  4. Search for COMM_METHOD in the Type field to see if it exists in the system.

  5. Add a new record to the COMM_METHOD type by entering BPEL for the Code field and Meaning field. Enter description information and save the record.

    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:

Trading Partner Setup

the picture is described in the document text

SOA Composite Application with BPEL Process Creation Flow

Based on the PO acknowledgement XML Transaction scenario, the following design-time tasks are discussed in this chapter:

  1. Create a new SOA Composite application with BPEL process

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

To create a SOA Composite application with BPEL process

  1. Launch Oracle JDeveloper.

  2. Click New Application in the Application Navigator.

    The Create SOA Application - Name your application page is displayed.

    The Create SOA Application - Name your application Page

    the picture is described in the document text

  3. Enter an appropriate name for the application in the Application Name field and select SOA Application from the Application Template list.

    Click Next. The Create SOA Application - Name your project page is displayed.

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

    The Create SOA Application - Name your project Page

    the picture is described in the document text

  5. In the Project Technologies tab, ensure that SOA is selected from the Available technology list to the Selected technology list.

    Click Next. The Create SOA Application - Configure SOA settings page is displayed.

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

    The Create BPEL Process page is displayed.

  7. Enter an appropriate name for the BPEL process in the Name field. For example, XMLGatewayOutbound.

    Select Define Service Later in the Template field. Click OK.

    Create BPEL Process

    the picture is described in the document text

    An empty BPEL process is created. The required source files including bpel and wsdl, using the name you specified (for example, XMLGatewayOutbound.bpel and XMLGatewayOutbound.wsdl) and composite.xml are also generated.

    An Empty BPEL Process

    the picture is described in the document text

Adding a Partner Link

This section describes how to create an Oracle Applications adapter for the application service by adding a partner link to your BPEL process. A BPEL partner link defines the link name, type, and the role of the BPEL process that interacts with the partner service.

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 BPEL Services in the Component palette.

    Drag and drop Oracle Applications from the BPEL Services list into the right Partner Link swim lane of the process diagram. The Adapter Configuration Wizard Welcome page appears. Click Next.

  2. Enter a service name in the Service Name field. For example, 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 Applications is running.

  4. Once you have completed creating a new connection for the service, you can add an outbound message map by browsing through the list of APIs available in Oracle Applications.

    Click Next.

    For Oracle E-Business Suite Release 12:

    If you are connecting to Oracle E-Business Suite Release 12, then the IREP File not present dialog appears indicating that Adapter could not find the Oracle Integration Repository data file corresponding to the database you are connecting in your workspace. Absence of the data file would make browsing or searching of Integration Repository tree considerably slow. You can choose to extract the data file and create a local copy of the Integration Repository data file. Once it is created successfully, Adapter will pick it up automatically next time and retrieve data from your local Integration Repository.

    You can select one of the following options:

    For Oracle E-Business Suite Release 11.5.9:

    If you are connecting to an Oracle E-Business Suite Release 11.5.9 instance, you must select the interface type in the Adapter Configuration Wizard. Select XML Gateway to proceed.

    Click Get Object 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 Oracle Application Adapter, 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.

  6. Click OK.

    Adapter Configuration Wizard - Application Interface Page

    the picture is described in the document text

  7. Click Next, 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 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, click BPEL Services and Components in the Component palette.

    Drag and drop Receive from the BPEL activity list into the center swim lane of the process diagram.

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

    The Receive dialog appears.

    Configuring the Receive Activity

    the picture is described in the document text

  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.

    Creating a Variable to Receive Message Data

    the picture is described in the document text

  5. Click OK to accept the default name.

  6. Select the Create Instance check box.

    Configuring the Receive Activity

    the picture is described in the document text

  7. Click Apply in the Receive dialog, then click OK.

Adding a Partner Link for File Adapter

Use this step to write PO acknowledgement details in an XML file as an output file.

To add a Partner Link for File Adapter:

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

    Drag and drop File Adapter from the BPEL Services list into the right Partner Link swim lane of the process diagram. The Adapter Configuration Wizard Welcome page appears.

    Click Next.

  2. In the Service Name dialog, enter a name for the file adapter service, for example, WriteAck.

  3. Click Next. The Adapter Interface page appears.

    Specifying the Adapter Interface

    the picture is described in the document text

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

  4. In the Operation page, specify the operation type. For example, select the Write File radio button. This automatically populates the Operation Name field.

    Specifying the Operation

    the picture is described in the document text

    Click Next to access the File Configuration page.

    Adapter Configuration Wizard - File Configuration Page

    the picture is described in the document text

  5. For the Directory specified as field, select Logical Name. Enter directory name in the Directory for Outgoing Files (logical name) field, for example, outputDir.

    Specify a naming convention for the output file, for example, POAck%yyMMddJJmmss%.xml.

    Select the Number of Messages Equals check box and set it to '1'.

    Click Next to open the Messages page.

  6. Select the 'browse for file schema' icon next to the URL field to locate the schema location and schema element.

    The Type Chooser dialog box appears. Expand the node by clicking Project Schema Files > CONFIRM_BOD_004.xsd. Select CONFIRM_BOD_004 and click OK.

    The selected schema information will be automatically populated in the URL and Schema Element fields.

    Adapter Configuration Wizard - Messages Page

    the picture is described in the document text

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

    Click Apply and 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 an Invoke Activity

This step is to configure an Invoke activity to write PO acknowledgement information to an XML file through invoking the partner link for File Adapter.

To add an Invoke activity:

  1. In JDeveloper BPEL Designer, select BPEL Activities and Components in the component palette. Drag and drop the Invoke activity into the center swim lane of the process diagram after the Receive activity.

  2. Link the Invoke activity to the WriteAck service.

    Adding an Invoke Activity

    the picture is described in the document text

    The Edit Invoke dialog appears.

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

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

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

    the picture is described in the document text

    The Invoke activity appears in the process diagram.

Adding an Assign Activity

Use the Assign activity to take the output from the Receive activity and to provide input to the Invoke activity.

To add an Assign activity:

  1. In JDeveloper BPEL Designer, select BPEL Activities and Components in the component palette. Drag and drop the Assign activity into the center swim lane of the process diagram, between the Receive and Invoke activities that you just created earlier.

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

    Click the General tab to enter a name for the Assign activity.

  3. Select the Copy Operation tab, click the 'Plus' sign icon and select Copy Operation from the menu. The Create Copy Operation window appears.

    Specifying a Copy Operation Action

    the picture is described in the document text

  4. Enter the assign parameters:

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

The following diagram illustrates the complete BPEL process diagram:

the picture is described in the document text

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

Note: Click the Source tab of composite.xml to enter a value for the physical directory outputDir for the reference WriteEventData (such as /usr/tmp).

<property name="outputDir" type="xs:string" many="false" override="may">/usr/tmp</property>

Oracle JDeveloper composite Diagram

the picture is described in the document text

Run-Time Task for XML Gateway Outbound Messaging

After designing the SOA Composite application with BPEL process, you can compile, deploy and test it.

  1. Deploy the SOA Composite application with BPEL process

  2. Test the SOA Composite with BPEL process

Deploying the SOA Composite Application with BPEL Process

You must deploy the SOA Composite with BPEL process before you can run it. The BPEL process contained in a SOA Composite application is first compiled, and then deployed to the application server (Oracle WebLogic Server) that you have established the connection.

Prerequisites

Before deploying the SOA Composite application using Oracle JDeveloper, you must ensure the following:

To deploy the SOA Composite application with BPEL process

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

  2. Right-click the project name. Select Deploy > [project name] > [serverConnection] from the menu that appears.

    Deploying the SOA Composite application

    the picture is described in the document text

    The BPEL process contained in the SOA Composite application is compiled and successfully deployed. You can check the progress in the Messages window.

    Compilation and Deployment Message Logs

    the picture is described in the document text

    the picture is described in the document text

Testing the SOA Composite Application with 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. This guide is part of the Oracle E-Business Suite Online Documentation Library which can be accessed on the Oracle Technology Network (OTN).

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 contained in a SOA Composite application has been executed.

To validate the design-time tasks created earlier, you can log in to Oracle Applications 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 SOA Composite application with 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 on 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 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 Orders form.

  2. Retrieve the order that you have created earlier by entering the order ID in the Customer PO field. For example, enter order_id_01.

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

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 contained in a SOA Composite application is deployed, the process is continuously polling the ECX_OUTBOUND queue for PO acknowledgement. It also writes PO Acknowledgement in the physical directory mentioned in composite.xml after receiving from XML Gateway ECX_OUTBOUND queue.

You can open file in text editor and search for ORIGREF element. Its value should be same as order id (order_id_01 whose order was booked.

the picture is described in the document text

Troubleshooting

If you experience problems with your Oracle XML Gateway integration, you can take the following troubleshooting steps:

Enable logging for Adapter to see if the issue is on the middleware side. How to enable logging for Adapter for Oracle Applications, see Enabling Logging for Adapters.