Execution Engine

This chapter covers the following topics:

Execution Engine Overview

The XML Gateway consists of three components: the Message Designer, Setup, and the Execution Engine. It interfaces with the following Oracle products:

The following diagram illustrates the process flow of XML messages through the XML Gateway Execution Engine using all the components mentioned above. Details of the XML Gateway Execution Engine are summarized below.

the picture is described in the document text

The XML Gateway Execution Engine can process messages properly after the following:

The XML Gateway Execution Engine does the following during processing:

Protocol Type

Each message enabled for a Trading Partner includes a protocol type (also known as communication method) that identifies the message delivery method. The associated correlation ID is determined internally and is associated with the message enqueued onto the agent (queue). Listeners defined for the agent will dequeue messages based on the correlation ID defined for it. For example, Oracle Transport Agent will only dequeue messages with a correlation ID of OXTA.

The following table shows the Protocol Type, Correlation ID, and Message System.

Protocol Type Correlation ID Message System
NONE N/A Message disabled
HTTP, HTTP-OXTA, HTTPS, HTTPS-OXTA, SMTP OXTA Oracle Transport Agent without attachments
OTAH-ATCH, OTAHS-ATCH OXTA Oracle Transport Agent with attachment using standard OTA envelope
HTTP-ATCH, HTTPS-ATCH OXTA Oracle Transport Agent with attachment and no OTA envelope
ITG03 ITG03 Oracle iProcurement Connector, must be enabled
IAS IAS Oracle Application Server, must be enabled
HTTP-WM, HTTPS-WM WebMethods Third party system available only to users of Oracle Exchange
SOAP N/A Web Service Agent
JMS N/A JMS Provider

The following graphics display the construction for each protocol type:

the picture is described in the document text

For protocol type SOAP, the Web Services provider dequeues the message payload, assembles any attachments, and constructs the SOAP envelope.

the picture is described in the document text

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 transmitted. Collectively, these attributes are called the XML Gateway envelope.

This section discusses the XML Gateway envelope and its data in the validation process for inbound messages, or its source of data for its creation for outbound messages. Data entered into the Trading Partner Setup form is referred to as data in the trading partner table. Data entered into the Define Transactions form is referred to as data in the transaction table.

Most of the data elements are copied from the Trading Partner tables or the Transaction tables to the XML Gateway envelope.

Transaction direction is determined by the XML Gateway. The direction values used by the XML Gateway are the following:

The XML Gateway envelope consists of the data presented in the following table:

Attribute Contents Sample Values Data Source
MESSAGE_TYPE Payload message format XML (Hard-coded)
MESSAGE_STANDARD Message format standard OAG Transaction table
TRANSACTION_TYPE External Transaction Type for that business document INVOICE Trading Partner table
TRANSACTION_SUBTYPE External Transaction Subtype for that business document PROCESS Trading Partner table
DOCUMENT_NUMBER Business document number such as invoice number (Not Used) N/A
PARTYID (Not Used) (Not Used) Trading Partner table. This is not used by the XML Gateway.
SOURCE_TP_LOCATION_CODE Source Trading Partner Location Code ACME_CHICAGO SOURCE TP LOCATION (if not recreated) or TARGET TP LOCATION CODE (if recreated) from Trading Partner table
PARTY_TYPE (Not Used) (Not Used) (Not Used)
PROTOCOL_TYPE Transmission Protocol SMTP, HTTP, HTTP-WM Trading Partner table
PROTOCOL_ADDRESS Transmission Address me@co.com, http://www.co.com:5555 Trading Partner table
USERNAME User Name User1 Trading Partner table if Connection is "DIRECT"; Hub Definition if "HUB"
PASSWORD password ****** Trading Partner table if Connection is "DIRECT"; Hub Definition if "HUB"
ATTRIBUTE1 (determined by application) N/A (determined by application)
ATTRIBUTE2 (determined by application) N/A (determined by application)
ATTRIBUTE3 Rerouting Location (used only if the message is rerouted)   TARGET TP LOCATION CODE from Trading Partner table
ATTRIBUTE4 (determined by application) N/A (determined by application)
ATTRIBUTE5 (determined by application) N/A (determined by application)
PAYLOAD XML business document (XML Message)  

MESSAGE_TYPE

Payload message format. This defaults to "XML".

MESSAGE_STANDARD

(Defaults to OAG.) Message format standard as displayed in the Define Transactions form and entered in the Define XML Standards form.

TRANSACTION_TYPE

External Transaction Type for the business document from the Trading Partner table.

TRANSACTION_SUBTYPE

External Transaction Subtype for the business document from the Trading Partner table.

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.

SOURCE_TP_LOCATION_CODE

Source Trading Partner Location Code if no data is found in the Destination Trading Partner Location Code in the Trading Partner table.

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.

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. Refer to XML Gateway Setup for details.

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:

Trading Partner Validation for Inbound Messages

Events Raised in Oracle Workflow Business Event System

Oracle Workflow Business Event System is a tool used to integrate with the Oracle e-Business Suite for event-based XML message creation and consumption.

Before XML Gateway processes the message:

Messages sent by the trading partner are staged onto a message queue. An Oracle Workflow listener dequeues the message from the message queue and raises an event to the XML Gateway to begin processing.

Refer to Message Queues for details.

After XML Gateway processes the message:

When XML Gateway completes processing the data according to the instructions in the message map associated with the trading partner, an event is published by XML Gateway to inform the Oracle e-Business Suite that it has successfully processed the inbound message. Any Oracle e-Business Suite module interested in this event may register a subscription to continue with the transaction.

XML Gateway Processing

Inbound messages can take two paths:

Standard XML Messages

The following table summarizes the required data in the XML Gateway envelope to identify standard XML messages. How this data is validated for an inbound message is described below.

Attribute Sample Values Used in Trading Partner Lookup
MESSAGE_STANDARD OAG YES
TRANSACTION_TYPE INVOICE YES
TRANSACTION_SUBTYPE PROCESS YES
PARTY_SITE_ID ACME_CHICAGO YES
ATTRIBUTE3 NULL NO
PAYLOAD (XML MESSAGE) N/A

Note: USERNAME and PASSWORD can be placed in the XML Gateway envelope by the system that created the XML message. The transport agent uses the USERNAME and PASSWORD for delivery purposes. These fields are not passed to the XML Gateway from the transport agent software.

"Pass-Through" XML Messages

XML Gateway can recreate, then route messages to another trading partner without loading the transaction into a base Oracle E-Business Suite application. This case is recognized by the presence of a trading partner code in ATTRIBUTE3 in the XML Gateway envelope in the inbound message.

If a trading partner location code is identified in ATTRIBUTE3 for an inbound message the following happens:

The following table summarizes the required data in the XML Gateway envelope to identify these messages, and key data for the pass through XML message.

Attribute (Original XML Message) Sample Inbound Message Values Pass-Through Message Created (Find its corresponding Trading Partner Setup for an OUTBOUND message where the Trading Partner is identified in ATTRIBUTE3 of the original message)
MESSAGE_STANDARD OAG OAG
TRANSACTION_TYPE INVOICE INVOICE
TRANSACTION_SUBTYPE PROCESS PROCESS
PARTY_SITE_ID ACME_CHICAGO BETA-LONDON (from original ATTRIBUTE3)
ATTRIBUTE3 (the DESTINATION TRADING PARTNER LOCATION CODE in the Trading Partner Setup table. This becomes the PARTY_SITE_ID for the outbound message.) BETA-LONDON  
PAYLOAD (XML Message) (XML Message)

Validation Against Data in the Trading Partner Setup Form

Inbound messages validate data only against data that was entered in the Trading Partner Setup form.

Source Trading Partner Location Code

Source Trading Partner Location Code is the code found in the XML envelope in PARTY_SITE_ID to identify the source of the message. This field must contain a value stored in Source Trading Partner Location Code in the Trading Partner setup table.

When a trading partner is entered into the Trading Partner Setup form, the Trading Partner Name and Trading Partner Site are selected from a list of values obtained from Oracle Receivables, Oracle Payables, or Oracle HR Locations. Associated with each Trading Partner site is a table ID in the base application. See Derive Address ID from Location Code action and Get Predefined Variable Value action if you wish to use this table ID in a message map.

The parameters listed in the table below compose a search key against the Trading Partner table. This key is used to determine if the Trading Partner is enabled for that transaction, then to retrieve the message map name to process the transaction.

Search Parameters Description Sample
PARTY_SITE_ID Source Trading Partner Location Code ACME_CHICAGO
TRANSACTION_TYPE External Transaction Type for that business document INVOICE
TRANSACTION_SUBTYPE External Transaction Subtype for that business document PROCESS
DIRECTION Determined by the XML Gateway IN

The following table shows data that is returned from a search against data that was entered in the Trading Partner Setup form:

Returned Data Description Sample
Trading Partner Site enabled for the message This data is stored in the table given the trading partner that was selected. This data is not displayed. 12345 (a table ID)
Message Map to use for this inbound transaction for the given trading partner   OAG_IN_INVOICE

Note that transaction direction is determined by the XML Gateway. The direction values used by the XML Gateway are the following:

Trading Partner Validation for Outbound Messages

Event Raised in Oracle Workflow Business Event System

Application business events for outbound messages are raised by the Oracle e-Business Suite module responsible for the transaction. The raise occurs at an application point of interest, such as when a purchase order is approved or an invoice is confirmed.

Event Subscription Defined in Oracle Workflow Business Event System

A corresponding event subscription is defined to consume the event. The event subscription may be based on the XML Gateway Rule Function or the Workflow Default Rule Function. Embedded in the XML Gateway Rule Function is a check to determine if the Trading Partner is defined and the message is enabled.

With the Workflow Default Rule Function, the Transaction Delivery Required function activity is used to make the same evaluation. The outbound document is generated and sent only if the Trading Partner is defined and the transaction is enabled. Which approach is used depends on what is known about the Trading Partner before the subscription is executed.

See: Integrating Oracle XML Gateway with Oracle Workflow Business Event System.

Dynamic Embedding of XML Fragments

XML Gateway can dynamically add XML segments at runtime as a child to any element defined on the Outbound XML Gateway Map during message generation.

To use this feature, users should create an In Process 'Execute Procedure' Action to execute procedure ECX_ACTIONS.GET_XML_FRAGMENT at the element under which the dynamic XML segment needs to be added. This procedure is available under APPS schema.

The API Signature
        ECX_ACTIONS.get_xml_fragment
         (proc_name IN varchar2,
          xml_fragment OUT NOCOPY varchar2);

How to Implement the OAG Confirmation Business Object Document

Purpose of the Confirmation Message

The purpose of the confirmation message is to communicate the status of a business document. In addition to providing general document status information, details regarding any errors detected may be included in the confirmation message.

The confirmation message is a general-purpose document that may be used to acknowledge any business document. It may be used in addition to but not as a substitute for specific purpose acknowledgements such as Purchase Order Acknowledgment or Purchase Order Change Acknowledgment documents.

Refer to www.openapplications.org for details regarding the Confirm Business Object Document (BoD) DTD.

Structure of the Confirmation Message

The confirmation message contains the following two parts:

XML Gateway Seeded Confirmation Message Maps

Oracle XML Gateway provides seeded maps for both the inbound and outbound Confirm BoD message. The names of the seeded message maps are as follows:

The XML Gateway seeded maps are incorporated into the Oracle E-Business Suite application business process where necessary.

E-Business Suite Seeded Events and Event Subscriptions

Usage of the Confirm BoD varies between application modules of the Oracle E-Business Suite. For application modules that have incorporated the Confirm BoD into their business processes, the process is modeled as follows:

Outbound Confirmation

the picture is described in the document text

Oracle XML Gateway sends an outbound confirmation message in response to an inbound business document.

The inbound business document initiates the process (Step 1). As with all inbound messages, XML Gateway notifies the Oracle E-Business Suite application that it has processed an inbound business document.

The application event subscription defined for the inbound document is executed (Step 2) and is followed by a raise event (Step 3) to notify XML Gateway to create and send the outbound confirmation (Step 4).

Steps 2 and 3 are defined separately to allow for application business processes between the consumption of the inbound business document and the creation and delivery of the outbound confirmation message.

Inbound Confirmation

the picture is described in the document text

Oracle XML Gateway will process an inbound confirmation message received from a the Trading Partner in response to an outbound business document. It will notify the Oracle E-Business Suite that it has processed an inbound confirmation message.

The application event subscription defined for the inbound confirmation message is executed. The behavior of the event subscription will vary by application module and is dependent on whether the application module is interested in negative, positive, or both types of confirmations.

How to Implement or Disable a Seeded Confirmation Message

The application event subscriptions to create and send an outbound message or to consume an inbound message are delivered by the Oracle E-Business Suite application modules.

The seeded event name for the inbound or outbound Confirm BoD message is as follows:

ORACLE.APPS.<COMPONENT>.<TASK>.CONFIRM

COMPONENT is the internal transaction type entered on the Define Transactions form. It represents the product short name.

TASK is the internal transaction subtype entered on the Define Transactions form. It represents a description of the object.

An example of an event name for a confirmation event associated with an outbound purchase order is: ORACLE.APPS.PO.POO.CONFIRM.

The corresponding seeded event subscription is defined as enabled. Use the Oracle Workflow Administrator: Add Events/Event Group window to view or disable the seeded events and event subscriptions if you do not wish to implement the Confirm BoD message.

To implement the seeded event subscriptions, define the Trading Partner and enable the confirmation message as follows:

  1. Define the Trading Partner using the XML Gateway Define Trading Partners form.

  2. Enable the business document and set the Document Confirmation flag to one of the following:

1 = Send confirmation only if there are errors

2 = Always send confirmation

Important: Ensure that for an outbound business document you enable an inbound confirmation document (Transaction Subtype CBODI); and for an inbound business document you enable an outbound confirmation document (Transaction Subtype CBODO).

Note: Make sure that the value for Source Trading Partner Location Code is the same for the original business document and its corresponding confirmation document.

Refer to Trading Partner Setup for more details on setting up the Trading Partner to implement the confirmation message.