Skip Headers

Oracle Workflow Administrator's Guide
Release 2.6.3

Part Number B10283-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 on a Workflow-enabled system that you define in the Event Manager.

When you install Oracle Workflow, several standard queues are created automatically for the standard Workflow agents. These queues all use either the standard WF_EVENT_T structure or JMS Text messages as their payload type. See: Standard Agents, Oracle Workflow Developer's Guide, Event Message Structure, Oracle Workflow API Reference, and Mapping Between WF_EVENT_T and SYS.AQ$_JMS_TEXT_MESSAGEE, Oracle Workflow API Reference.

The following table lists the standard queues.

Queue Table Queue Name Payload Type Description
WF_CONTROL WF_CONTROL SYS.AQ$_JMS_TEXT_MESSAGE Oracle Workflow internal queue, not for customer use
WF_DEFERRED WF_DEFERRED WF_EVENT_T Standard queue for deferred subscription processing
WF_ERROR WF_ERROR WF_EVENT_T Standard queue for error handling
WF_IN WF_IN WF_EVENT_T Default inbound queue
WF_JMS_IN WF_JMS_IN SYS.AQ$_JMS_TEXT_MESSAGE Default inbound queue for JMS Text messages
WF_JMS_OUT WF_JMS_OUT SYS.AQ$_JMS_TEXT_MESSAGE Default outbound queue for JMS Text messages
WF_NOTIFICATION_IN WF_NOTIFICATION_IN SYS.AQ$_JMS_TEXT_MESSAGE Standard inbound queue for e-mail notification responses
WF_NOTIFICATION_OUT WF_NOTIFICATION_OUT SYS.AQ$_JMS_TEXT_MESSAGE Standard outbound queue for e-mail notifications
WF_OUT WF_OUT WF_EVENT_T Default outbound queue

Note: Oracle Workflow also includes three additional queues named WF_REPLAY_IN, WF_REPLAY_OUT, and WF_SMTP_O_1_QUEUE, which are not currently used.

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.

You can also set up your own queues for event message propagation. You can either set up queues manually, or use Oracle DBA Studio in the Oracle Enterprise Manager to perform this step. Oracle DBA Studio allows workflow administrators to quickly and easily create and administer database links, queue tables, queues, and queue propagation without requiring knowledge of the SQL DDL commands. See: DBA Management Pack, Oracle Enterprise Manager Administrator's Guide.

To set up a queue manually, you must create the queue table, create the queue, and start the queue. You should perform these tasks using a schema that is appropriate for the application for which you will use the queue. You must specify the schema that owns the queue as part of the queue name when you assign the queue to a Business Event System agent.

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');
For queues that you want use the standard Workflow format, specify the queue payload type as WF_EVENT_T. These queues can use the standard queue handler provided with Oracle Workflow, WF_EVENT_QH. For queues that you want to use the JMS Text message format, specify the queue payload as $AQ_JMS_TEXT_MESSAGE. These queues can use the standard JMS queue handler provided with Oracle Workflow, WF_EVENT_OJMSTEXT_QH. If you define a queue with a different payload type, you must create a queue handler to translate between the standard Workflow format and the format required by the queue. See: Standard APIs for a Queue Handler, Oracle Workflow Developer's Guide.
You can also use the storage_clause parameter to specify the tablespace where you want to create the queue table. You may want to specify a tablespace if you expect a queue to be very large.
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 verify that your queues are set up properly using the Check Setup web page if you are using the standalone version of Oracle Workflow, or using the Oracle Workflow Manager component of Oracle Applications Manager if you are using the version of Oracle Workflow embedded in Oracle Applications. See: Checking the Business Event System Setup or the Oracle Applications Manager online help.

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 or Oracle Streams AQ Administrative Interface, Oracle Streams Advanced Queuing User's Guide and Reference

DBMS_AQADM, Oracle Supplied PL/SQL Packages Reference


         Previous  Next          Contents  Index  Glossary


Oracle Logo
Copyright © 2003 Oracle Corporation.

All rights reserved.