Skip Headers

Oracle Workflow API Reference
Release 2.6.3

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

Event

PL/SQL Syntax

procedure Event

(itemtype in varchar2,
itemkey in varchar2,
process_name in varchar2 default null,
event_message in wf_event_t);

Description

Receives an event from the Business Event System into a workflow process.

If the specified item key already exists, the event is received into that item. If the item key does not already exist, but the specified process includes an eligible Receive event activity marked as a Start activity, the Workflow Engine creates a new item running that process.

Within the workflow process that receives the event, the procedure searches for eligible Receive event activities. An activity is only eligible to receive an event if its event filter is either blank or set to that particular event. Additionally, the activity must have an appropriate status.

For each eligible Receive event activity, Event() stores the event name, event key, and event message in the item type attributes specified in the event activity node, if they have been defined. Additionally, the procedure sets any parameters in the event message parameter list as item type attributes for the process, creating new item type attributes if a corresponding attribute does not already exist for any parameter. Then the Workflow Engine begins a thread of execution from the event activity.

If no eligible Receive event activity exists for a received event, the procedure returns an exception and an error message.

Note: If the event received by a Receive event activity was originally raised by a Raise event activity in another workflow process, the item type and item key for that process are included in the parameter list within the event message. In this case, the Workflow Engine automatically sets the specified process as the parent for the process that receives the event, overriding any existing parent setting. See: SetItemParent.

Arguments (input)

itemtype A valid item type.
itemkey A string that uniquely identifies the item within an item type. The item type and key together identify the process.
Note: The item key for a process instance can only contain single-byte characters. It cannot contain a multibyte value.
process_name An optional argument that allows the selection of a particular subprocess for that item type. Provide the process activity's label name. If the process activity label name does not uniquely identify the subprocess you can precede the label name with the internal name of its parent process. For example, <parent_process_internal_name>:<label_name>. If this argument is null, the top level process for the item is started. This argument defaults to null.
event_message The event message containing the details of the event.

         Previous  Next          Contents  Index  Glossary


Oracle Logo
Copyright © 2003 Oracle Corporation.

All rights reserved.