Oracle Workflow Guide
Release 2.6.2

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

Workflow Queue APIs

Oracle Workflow queue APIs can be called by an application program or a workflow function in the runtime phase to handle workflow Advanced Queues processing. In Oracle Workflow, an 'outbound' and an 'inbound' queue are established. A package of data on the queue is referred to as an event or a message.

Note: An event in this context is different from the business events associated with the Business Event System, and a message in this context is different from the messages associated with notification activities.

Events are enqueued in the outbound queue for agents to consume and process. These agents may be any application that is external to the database. Similarly an agent may enqueue some message to the inbound queue for the Workflow Engine to consume and process. The outbound and inbound queues facilitate the integration of external activities into your workflow processes.

Note: Background engines use a separate 'deferred' queue.

All Oracle Workflow queue APIs are defined in a PL/SQL package called WF_QUEUE. You must execute these queue APIs from the same Oracle Workflow account since the APIs are account dependent.

Attention: In using these APIs, we assume that you have prior knowledge of Oracle Advanced Queuing concepts and terminology. Refer to the Oracle Application Developer's Guide - Advanced Queuing for more information on Advanced Queues.

Note: In a future release, this workflow Advanced Queues processing will be implemented within the Business Event System using a specialized queue handler to handle dequeue and enqueue operations.

Queue APIs

Developer APIs for the Inbound Queue The following APIs are for developers who wish to write to the inbound queue by creating messages in the internal stack rather than using WF_QUEUE.EnqueueInbound( ). The internal stack is purely a storage area and you must eventually write each message that you create on the stack to the inbound queue.

Note: For efficient performance, you should periodically write to the inbound queue to prevent the stack from growing too large.

Payload Structure

Oracle Workflow queues use the datatype system.wf_payload_t to define the payload for any given message. The payload contains all the information that is required about the event. The following table lists the attributes of system.wf_payload_t.

Attribute Name Datatype Description
ITEMTYPE VARCHAR2(8) The item type of the event.
ITEMKEY VARCHAR2(240) The item key of the event.
ACTID NUMBER The function activity instance ID.
FUNCTION_NAME VARCHAR2(200) The name of the function to execute.
PARAM_LIST VARCHAR2(4000) A list of "value_name=value" pairs. In the inbound scenario, the pairs are passed as item attributes and item attribute values. In the outbound scenario, the pairs are passed as all the attributes and attribute values of the function (activity attributes).
RESULT VARCHAR2(30) An optional activity completion result. Possible values are determined by the function activity's Result Type or can be an engine standard result.

See Also

Standard API for PL/SQL Procedures Called by Function Activities

Advanced Queuing: Oracle Application Developer's Guide - Advanced Queuing


         Previous  Next          Contents  Index  Glossary


Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.