Oracle Workflow Developer's Guide|
Part Number B12161-02
To Create an Event Activity
2. An event activity must have an Internal Name (all uppercase and no leading/trailing spaces) and a Display Name, which is the translatable name that appears in your process diagram. Use the description to provide an explanation about this activity.
Attention: To update the internal name for an activity once it is defined, you must use a special SQL script called wfchact.sql. You should only use this script to correct errors in an activity's internal name during design time. Do not use this script to rename activities that are involved in running instances of processes. See: Wfchact.sql, Oracle Workflow Administrator's Guide.
Caution: Do not include colons ":" or leading/trailing spaces in your internal name.
You can also drag and drop icon files from the Windows Explorer or File Manager onto an activity in your navigator tree to assign that icon to the activity.
4. Select the Event Action for the activity.
- Receive--Receive an event from the Business Event System.
- Raise--Raise an event to the Business Event System.
- Send--Send an event directly from one Event agent to another agent without re-raising the event to the Business Event System.
Note: Depending on the event action you select, you may need to define item type attributes for some or all of the following event details:
When you include the event activity as a node in a process, you can use the item type attributes to specify where to store or retrieve the required event detail information for that node. The item type attributes that you use for event details must be associated with the same item type as the event activity itself. See: To Define an Item Type or Activity Attribute and To Define Event Details for an Event Node.
5. If you are defining a Receive event activity, you can optionally enter an Event Filter to specify the event that the activity can receive.
- To allow the activity to accept only one specific event, enter the full internal event name.
- To allow the activity to accept any event that is a member of a specific event group. enter the full internal event group name.
- To allow the activity to accept any event, leave the Event Filter field blank.
6. Enter an optional cost for the activity. For event activities with the event actions Raise or Send, you can use the cost to defer long running activities to a background engine. See: Activity Cost.
7. Choose Apply to save your changes.
9. Select the Roles tab page to specify the roles that have access to this function activity. (This functionality will be supported in a future release.)
11. The event activity now appears beneath Events in the navigator tree. You can review or edit the properties of this activity at any time by double-clicking on the activity in the navigator tree or by selecting the activity and choosing Properties from the Edit menu or by pressing Enter on your keyboard.
Note: A Raise event activity also automatically sets the item type and item key for the current workflow process in the parameter list for the event message. If the event message is later received by another process, the Workflow Engine uses that item type and item key to automatically set the process that raised the event as the parent for the process that receives the event. See: SetItemParent, Oracle Workflow API Reference.
If you want to raise the new event using the event data and parameter list from an existing event message, you can also define a special activity attribute named #EVENTMESSAGE2 for the raise event activity. Set the existing event message as the value of the #EVENTMESSAGE2 attribute, which must be an attribute of type event. If this attribute is defined, the activity retrieves the event data and parameter list from the specified event and sets them into the new event message before it is raised.
Note: If you also specified event data in the node's event details, however, the activity sets that event data into the event, overriding any event data from the #EVENTMESSAGE2 attribute. If you specified any additional parameters in activity attributes for the raise event activity, the activity also sets those parameters into the parameter list for the event message, overriding the values of any parameters with the same names from the #EVENTMESSAGE2 attribute.
To create an event activity attribute that references an item type attribute, select the referenced item type attribute in the navigator tree, and hold down your mouse select button as you drag the item type attribute to your event activity. The Default Value region is automatically set to Item Attribute and references the originating item attribute.
When you include an event activity as a node in a process, you can assign a value to the event activity attribute that is specific to that node. See: To Define Activity Attribute Values.
13. For a receive event activity, if you want to match the event with one or more workflow processes based on a business key rather than sending the event to one particular workflow process, define a special activity attribute named #BUSINESS_KEY. This attribute must be of type text. Set the default value of the activity attribute to an item type attribute, and include logic in your workflow process to set that item type attribute to an appropriate business key value at runtime. For the workflow process to receive an event, this business key must match the event key. See: To Define an Item Type or Activity Attribute and Event Subscriptions for Standalone Oracle Workflow or Event Subscriptions for Oracle Applications.
To Copy an Activity
Copyright © 2003, 2004, Oracle. All rights reserved.