Message Queues

This chapter covers the following topics:

Queues

Queues are tables on a database that are managed by Oracle Advanced Queuing.

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 E-Business Suite products or other source process, and the XML Gateway. Details about these queues are provided in the table below.

Queue Name Description Level and Position in Process
ECX_INBOUND Inbound Message Queue: Holds all messages that enter the process through the Transport Agent, or are placed directly on the queue by an API. Transport Agent Level Between the Transport Agent and the Inbound Transaction Queue
ECX_OUTBOUND Outbound Message Queue: XML Gateway enqueues all outbound messages that it formatted on this queue. Transport Agent Level Between the XML Gateway and the Transport Agent
ECX_IN_OAG_Q Inbound Transaction Queue: Holds inbound messages that originated from the ECX_INBOUND queue, then enqueued on this queue by Oracle Workflow. These messages will be processed by the XML Gateway Java or PL/SQL engine depending on the profile value set at the ECX_IN_JAVA_PROCE SSING profile option. Intermediate Level After the message is received through the Transport Agent (Transport Agent Level above), Oracle Workflow enqueues the message in this queue for the XML Gateway to process.
If the profile option ECX_IN_JAVA_PROCE SSING is set to 'Yes', inbound messages will be processed in Java. If the profile value is set to 'No', inbound messages will be continued in PL/SQL processing.
WF_ERROR Workflow Error Queue: For errors detected by XML Gateway or WF BES. Notifications are sent to a Trading Partner contact or the System Administrator. Transaction Level

Refer to the Oracle Streams Advanced Queuing User's Guide from Oracle Database Documentation Library for details on checking the status and contents of the queues. Also, refer to the XML Gateway B2B Transactions Using JMS Queues chapter in this book for details on JMS queues.

Outbound Queues

Outbound Message Queues

Components and Flow Diagram of Processing Outbound Messages

the picture is described in the document text

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.

Next Step: The Transport Agent dequeues the message and delivers it to the Trading Partner.

Inbound Queues

Inbound Message Queue

Components and Flow Diagram of Processing Inbound Messages

the picture is described in the document text

Inbound messages are first queued on the Inbound Message Queue.

The inbound Message Queue is positioned between the Transport Agent and the Oracle Workflow Business Event System.

There are two methods for placing a message on the Inbound Message Queue:

The full message must be formatted according to the XML Gateway envelope message format described in the Execution Engine section. See XML Gateway Envelope for details.

Next Step: Oracle Workflow Business Event System will copy the inbound messages to the proper inbound Transaction Queue. One queue is seeded, but you may define other queues to meet your business needs. See information below.

Inbound Transaction Queue

This is the second queue for an inbound message.

After the message is received through the inbound Message Queue, Oracle Workflow Business Event System enqueues the message to this queue for the XML Gateway to process.

Next Step: The XML Gateway engine dequeues the message and retrieves the ECX_IN_JAVA_PROCESSING profile value to determine if the inbound message placed in the queue will be processed in Java or in PL/SQL. For more information about this profile option, see Define System Profile Options.

Error Queue

When an error is detected by Oracle XML Gateway or Oracle Workflow Business Event System the message is enqueued on to the error queue. A Workflow listener dequeues the error and sends a notification to the Trading Partner contact for data errors or to the System Administrator contact for system or process errors.

XML Gateway Message Format

XML messages that are enqueued or dequeued for processing by XML Gateway must conform to the apps_ne.ecxmsg data type.

The apps_ne.ecxmsg data type consists of the following:

Name Type
MESSAGE_TYPE VARCHAR2(80)
MESSAGE_STANDARD VARCHAR2(80)
TRANSACTION_TYPE VARCHAR2(80)
TRANSACTION_SUBTYPE VARCHAR2(80)
DOCUMENT_NUMBER VARCHAR2(80)
PARTYID VARCHAR2(80)
SOURCE_TP_LOCATION_CODE VARCHAR2(80)
PARTY_TYPE VARCHAR2(80)
PROTOCOL_TYPE VARCHAR2(200)
PROTOCOL_ADDRESS VARCHAR2(200)
USERNAME VARCHAR2(200)
PASSWORD VARCHAR2(200)
ATTRIBUTE1 VARCHAR2(200)
ATTRIBUTE2 VARCHAR2(200)
ATTRIBUTE3 VARCHAR2(200)
ATTRIBUTE4 VARCHAR2(200)
ATTRIBUTE5 VARCHAR2(200)
PAYLOAD CLOB

Refer to XML Gateway Envelope for a description of each field.

Non-Oracle messaging systems can enqueue an XML message for the Oracle E-Business Suite to process. This is done by defining an object of the same data type, populating the object, then calling an Advanced Queuing enqueue API to enqueue the object. The Oracle E-Business Suite Transport Agent will receive the object and deposit it onto the ECX_OUTBOUND agent. From there, the standard inbound agent listener assumes control of the process.