Previous  Next          Contents  Index  Glossary  Library

Activities

An activity is a unit of work that contributes toward the accomplishment of a process. An activity can be a notification, a function, or a process. A notification activity sends a message to a workflow user. The message may simply provide the user with information or request the user to take some action. A function activity calls a PL/SQL stored procedure to perform an automated function. A process activity is a modelled workflow process, which can be included as an activity in other processes to represent a sub-process.

Activities are organized beneath their respective headings in the navigator tree. You can create, edit, and delete activity definitions in the navigator tree, and drag an activity from the tree into a Process window to create a new usage of that activity in a process.

Each activity is depicted as an icon in a process diagram. Ideally, a process diagram should contain different activities that are represented by different icons.

Oracle Workflow provides an item type called Standard that includes generic activities you can use in any process you define. For example, some of the activities perform standard functions such as comparing two values. See: Standard Activities.

Oracle Workflow also provides an item type called System:Error that includes activities you can use to create a custom error process. You can assign your custom error process to a process activity, so that if an error occurs, Oracle Workflow knows what to do to handle the error. See: Default Error Process.

Notification Activity

When the workflow engine reaches a notification activity, it issues a Send( ) API call to the Notification System to send the message to an assigned performer. You define the message that the notification sends. The message can be an informative note or it can prompt the performer for a response. When a performer responds to a notification activity that requires a response, the Notification System processes the response and informs the workflow engine that the notification activity is complete so that it can continue processing the next eligible activity. See: To Create a Notification Activity.

You must specify the performer of a notification activity in the Process window when you include the notification as an activity node in the process. You can either designate the performer to be a specific role or an item type attribute that dynamically returns the name of a role. See: To Define Nodes.

When you define a notification activity, you have the option of expanding the role that you send the notification to. If you do not expand the role for a notification activity, Oracle Workflow sends one copy of the notification message to the assigned performer role and that notification is visible in the notification queue of all the users in that role. However, if one user in that role responds or closes that notification, the notification will be removed from the notification queue of all other users in that role.

If you expand the role for a notification activity, Oracle Workflow sends an individual copy of that notification message to each user in the role and that notification will remain in any user's notification queue until that user responds or closes the notification. Generally, you want to expand the role for a notification activity if the activity sends out a broadcast-type message that you want all users of that role to see. You can also use the Expand Roles feature to create your own custom vote tallying activity. Voting Activity.

Function Activity

A function activity is defined by the PL/SQL stored procedure that it calls and is executed directly by the Workflow Engine. Function activities are typically used to perform fully automated steps in the process, and as PL/SQL stored procedures, they accept standard arguments and can return a completion result. See: To Create a Function Activity.

If you externalize a parameter for the stored procedure, you can expose that parameter as an activity attribute. The activity attribute's value can be set in the Process window when you define that activity as a node in your process. Note that these activity attributes can be accessed only by the current activity and are not global like item type attributes. See: To Define Activity Attribute Values.

Process Activity

A process activity represents a collection of activities in a specific relationship. When a process activity is contained in another process it is called a sub-process. In other words, activities in a process can also be processes themselves. There is no restriction on the depth of this hierarchy. See: To Create a Process Activity.

Activity Cost

Each function activity has a cost associated with it. The cost is a value representing the number of seconds it takes for the Workflow Engine to execute the activity. If you do not know how long it takes for the engine to perform the activity, you can enter an estimated cost and update it later as you accumulate more information about its performance. Generally, you should assign complex, long running activities a high cost.

Attention: Although the cost is entered and displayed in seconds in Oracle Workflow Builder, it is actually converted and stored in the database as hundredths of a second.

In normal processing, the Workflow Engine completes the execution of a single activity before continuing to a subsequent activity. In some cases, an activity might take so long to process that background processing would be more appropriate.

You can define your workflow engine to defer activities with costs higher than a designated threshold to a background process. The engine then continues processing the next pending eligible activity that may occur in another parallel branch of the process.

The default threshold for the Workflow Engine is 50 hundredths of a second. Activities with a cost higher than this are deferred to background engines. A background engine can be customized to execute only certain types of activities. You can set the workflow engine threshold through SQL*Plus. See: Setting Up Background Workflow Engines and To Set Engine Thresholds.


         Previous  Next          Contents  Index  Glossary  Library