Oracle Workflow Guide
Release 2.6.2

Part Number A95265-02
Previous Next       Contents Index Glossary
         Previous  Next          Contents  Index  Glossary

Setting Up Queues

The Business Event System uses Oracle Advanced Queuing (AQ) to communicate event messages between systems. You must associate a queue with each agent you define in the Event Manager.

When you install Oracle Workflow, four standard queues are created automatically for the four standard Workflow agents. These queues all use the standard WF_EVENT_T structure as their payload type. See: Standard Agents and Event Message Structure.

The following table lists the standard queues.

Queue Table Queue Name Description
WF_IN WF_IN Default inbound queue
WF_OUT WF_OUT Default outbound queue
WF_DEFERRED WF_DEFERRED Default queue for deferred subscription processing
WF_ERROR WF_ERROR Default queue for error handling

The default retention time set for consumed messages on the standard Workflow queues is seven days. You can change the retention time if necessary using the PL/SQL procedure DBMS_AQADM.Alter_Queue. You must not change any other part of the setup of these queues.

However, you must schedule listeners for WF_DEFERRED and WF_ERROR to enable deferred subscription processing and error handling for the Business Event System, respectively. Also, if you want to use WF_IN and WF_OUT for event message propagation, schedule a listener for WF_IN and propagations for WF_OUT as well. See: Scheduling Listeners for Local Inbound Agents and Scheduling Propagations for Local Outbound Agents.

You can also set up your own queues for event message propagation. To set up a queue, you must create the queue table, create the queue, and start the queue.

		DBMS_AQADM.Create_Queue_Table (
queue_table => '<queue table name>',
queue_payload_type => '<queue payload type>',
sort_list => 'PRIORITY,ENQ_TIME',
multiple_consumers => TRUE
compatible => '8.1');

		DBMS_AQADM.Create_Queue (
queue_name => '<queue name>',
queue_table => '<queue table name>');

Note: If you want other database users to enqueue messages onto or dequeue messages from your queue, you must grant those users the appropriate privileges using the PL/SQL procedure DBMS_AQADM.Grant_Queue_Privilege.

		DBMS_AQADM.Start_Queue (
queue_name => '<queue name>');

Oracle Workflow provides a sample script called wfevquec.sql which you can modify to set up your queues, as well as a sample script called wfevqued.sql which you can modify to drop queues. These scripts are located on your server in the Oracle Workflow sql subdirectory for the standalone version of Oracle Workflow, or in the sql subdirectory under $FND_TOP for the version of Oracle Workflow embedded in Oracle Applications.

You can use the Check Setup web page to verify that your queues are set up properly. See: Checking the Business Event System Setup.

Note: SQL*Plus version 8.1.6 does not allow you to select the USER_DATA column from queue tables. You must have SQL*Plus version 8.1.7 or higher, which allows you to select USER_DATA, if you want to be able to select the event message payload from your Workflow queues.

See Also

Administrative Interface, Oracle Application Developer's Guide - Advanced Queuing

DBMS_AQADM, Oracle Supplied PL/SQL Packages Reference


         Previous  Next          Contents  Index  Glossary


Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.