Diagramming a Process

This section discusses how to draw and define a workflow process in the process window:

arrow icon   To Add Nodes to a Workflow Process:

  1. To begin drawing a process diagram, you must first display the process window for your process activity. To display a process window, you can do one of several things:

    A process window opens with the name of your process in the window title.

  2. Create a new node in a process by using one of the following methods:

  3. In the process window, you can display information about an activity by moving your mouse over the activity. The Label Name, Internal Name, Display Name, Comment and Performer, appear in a "tool-tip"-style display.

  4. If you single click on an activity node in the process window, Oracle Workflow Builder expands the navigator tree and highlights the master activity of the node you select.

  5. Create an arrow (transition) between two activity nodes by holding down your right mouse button and dragging your mouse from a source activity to destination activity.

  6. If the source activity has no result code associated with it, then by default, no label appears on the transition. If you specifically choose to show the label for such a transition, the label <Default> appears. See: To Create and Edit a Transition.

    If the source activity has a result code associated with it, then a list of lookup values appears when you attempt to create a transition to the destination activity. Select a value to assign to the transition. You can also select the values <Default>, <Any>, or <Timeout> to define a transition to take if the activity returns a result that does not match the result of any other transition, if the activity returns any result, or if the activity times out, respectively.

    You can also drag and drop a lookup code from the navigator tree onto an existing transition in the process window to change the result of that transition. The lookup code you drag and drop must belong to the same data store and same lookup type as the lookup code you replace.

  7. You can select an entire region of a process diagram, containing multiple activity nodes and transitions, and make a copy of the selection by holding down the Control or Shift key as you drag the selection to a new position in the process window.

    Important: Oracle Workflow does not support reusing a subprocess activity multiple times within a process hierarchy. If you wish to use a subprocess more than once in a process, you must create a distinct copy of the subprocess for each instance needed.

  8. Turn on grid snap from the View menu to snap your activity icons to the grid when you complete your diagram. Grid snap is initially turned on by default until you change the setting, at which point the latest setting becomes your default.

arrow icon   To Define Nodes in a Process:

  1. Open the process window for your process activity.

  2. To create a new function, notification, event, or process node, first select the New Function, New Notification, New Event, or New Process icon from the process window toolbar. Next, click on the position within the process window where you want to place this new node. The property page for the new node appears.

    Note: You can also create a new node by dragging and dropping a predefined activity from the navigator tree into the process window. This automatically populates the node's property page with predefined information. Double-click on the node and skip to Step 5 to further edit its property page.

  3. In the Item Type field, select the item type that you want this activity node to be associated with.

  4. Choose one of the following methods to define the remaining information for the node.

    Caution: Any changes that you make to the any of the above tabs automatically propagate to the master activity and affect all other instances of that activity. Only changes that you make to the Node and Node Attributes tabs, and to the Event Details tab for an event activity, are local and specific to the current node activity.

  5. Select the Node tab to specify information that is specific to this node. Specify a Label for the node. Since an activity can be used more than once in any given process, the Label field lets you give a unique name to the instance of this particular activity in the process. By default, the label name is the activity name, but if the activity is used more than once in the process, -N is appended to the activity name, where N represents the 'Nth' instance of the activity in use.

    Important: When you call most Oracle Workflow APIs, you must pass the activity's label name and not its activity name. See: Workflow Engine APIs.

  6. Indicate if the current node is a start or end activity in your process, by choosing 'START' or 'End', respectively. 'NORMAL' is the default if it is neither. You may have multiple START and END nodes in your process.

    A Start activity is marked (Start) and has a small green arrow in its activity icon, and an End activity is marked (End) and has a red arrow in its activity icon.

    Important: The Start/End field is always set to Normal by default for all activity nodes. Even if you use the Standard Start or Standard End activity, you must manually edit the Start/End field to be either Start or End, respectively.

  7. For an END node, you must also select a value for the final process result if the overall process activity has a result type associated with it. The list of values for the final process result is derived from the lookup type specified as the process activity's result type.

  8. You can provide a comment to yourself about this node.

  9. For a notification that requires a response, a process activity that is a subprocess within another process, an event activity with an event action of Receive, or a blocking function activity, specify whether the activity must be completed by some specified time. If the activity is not completed by a given time, you can redirect the parent process to transition to a different activity. See: Timeout Transitions.

    Choose 'No Timeout' if the activity does not have to be completed by a given time.

    Choose 'Relative Time' if you want the activity to be completed by some constant relative time. You can enter any combination of days, hours and minutes to specify when the activity times out. The value you enter is interpreted as a relative offset from the begin date of the activity, in the unit of minutes. A relative timeout value of zero means no timeout.

    Choose 'Item Attribute' if you want the activity to be completed by some relative time that is computed dynamically at runtime. Note that you must first create an item attribute of type number to store the computed timeout value and reference that predefined item attribute here. See: Item Type Attributes and To Define an Item Type or Activity Attribute.

    Important: The dynamic timeout value stored in this attribute is interpreted as a relative offset from the begin date of the activity, in the unit of minutes. A null timeout value or a value of zero means no timeout.

  10. For a notification activity node, or for an event activity node with an event action of Send, you can override the priority assigned to the activity's message. Choose 'Default' to keep the default priority of the message.

    Choose 'Constant' to override the default priority with the new specified priority level.

    Choose 'Item Attribute' to override the default priority with a new priority level that is dynamically determined at runtime. Note that you must first create an item attribute of type number to store the computed priority value and reference that predefined item attribute here. See: Item Type Attributes and To Define an Item Type or Activity Attribute.

    Note: The computed priority value can be any number between 1-99. Oracle Workflow automatically converts the number to a priority level as follows: 1-33 = High, 34-66=Normal, and 67-99=Low.

  11. For a notification activity node, specify the performer of the activity. The performer is the role to whom the notification is sent. You may either select a constant role name or an item type attribute that dynamically determines the role at runtime. Note that you must first create an item attribute of type role to store the computed role name and reference that predefined item attribute here. See: Item Type Attributes, To Define an Item Type or Activity Attribute, and Referencing Roles.

    Note: If you set the Performer Type to Constant and you are connected to the database and have loaded roles from the database, you can select a constant role name from the Performer poplist. If you are working in a .wft file data store without any open connection to the database, you can directly type in a valid role display name in the Performer field. When you upload the file to a database, the role will be resolved to the appropriate role data stored in the database based on the role display name you entered.

    Note: When you assign a notification to a multi-user role, the Workflow Engine keeps track of the individual from that role that actually responds to the notification. See: Respond API.

    Note: Although Oracle Workflow Builder allows you to specify a performer for any type of node activity, Oracle Workflow only considers the value of Performer for notification activity nodes.

  12. Choose Apply to save your changes, OK to save your changes and close the property page or Cancel to cancel your changes and close the property page.

    When you save and close your property page, the activity node appears in the position you specified in the process window. If this is a new activity you created, a corresponding master activity is also created under the appropriate branch in the navigator tree.

  13. If the node is an event activity, you can specify additional required event information by choosing the Event Details tab. See: To Define Event Details for an Event Node.

  14. If the node is a function, notification, or event activity and the activity has activity attributes, you can assign values to those activity attributes by choosing the Node Attributes tab. See: To Define Activity Attribute Values.

  15. If the node is a process activity, then a small subprocess overlay icon appears over the upper right corner of process activity icon. The subprocess overlay icon identifies the node as a subprocess within the process diagram.

arrow icon   To Define Event Details for an Event Node:

The event action defined for the event activity determines which event details you must define for an event node. For each event detail, it is either required or optional to use an item type attribute to store or retrieve the detail information. Note that you must first create item type attributes of the appropriate types before you can reference those predefined item attributes here. The item type attributes you use for event details must be associated with the same item type as the event activity itself. See: Item Type Attributes, To Define an Item Type or Activity Attribute, Event Activity, and To Create an Event Activity.

  1. Display the property pages of an event activity node. Select the Event Details tab.

  2. For an activity with the event action Receive, enter the following event details:

    Note: When the activity receives an event, the Workflow Engine stores the event name, event key, and event message in the item type attributes you specify, and also 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.

    Additionally, if the event 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.

  3. For an activity with the event action Raise, enter the following event details:

    Note: The Event Name and Event Key are required for a Raise event activity.

    Note: In addition to these event details, you can use the activity attributes for a Raise event activity node to specify parameters that you want to include in the parameter list for the event message. If the event message is later received by another process, the Workflow Engine sets the event parameters as item type attributes for that process. See: To Define Activity Attribute Values.

    Also, a Raise event activity 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.

    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.

    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.

  4. For an activity with the event action Send, enter the following event details:

    Note: The Event Message is required for a Send event activity. Additionally, you must either include a To Agent or a From Agent within the event message, or specify a To Agent or an Out Agent in the event details for this node. If you neither specify an inbound agent nor an outbound agent, the event cannot be sent.

    Note: If no correlation ID is initially specified in the event message, Oracle Workflow automatically sets the correlation ID to the item key of the process.

  5. Choose Apply to save your changes, OK to save your changes and close the property page, or Cancel to cancel your changes and close the property page.

arrow icon   To Define Activity Attribute Values:

Activity attribute values for a function or notification activity are used by the PL/SQL stored procedure that the activity calls. Activity attribute values for a raise event activity are set as parameters in the parameter list for the event message, except for the special #EVENTMESSAGE2 activity attribute. If the #EVENTMESSAGE2 attribute is defined, the raise event activity retrieves the event data and parameter list from the specified existing event and sets them into the new event message before it is raised. For a receive event activity, the special #BUSINESS_KEY attribute is used to determine whether the activity is eligible to receive an event sent from the Event Manager based on whether the business key value matches the event key. See: To Define an Item Type or Activity Attribute.

  1. Display the property pages of an activity node. Select the Node Attributes tab.

  2. Select an attribute.

  3. In the Value region, enter the value for this attribute. The value can be a constant or a value stored in an item type attribute.

    The value you enter must match the data type of the activity attribute, and of the actual activity parameter itself as it is defined in the PL/SQL function associated with the activity, if there is one. The attribute type is displayed along with the name, description, value type, and value of each attribute in the attributes summary region.

  4. Choose Apply to save your changes, OK to save your changes and close the property page or Cancel to cancel your changes and close the property page.

arrow icon   To Create and Edit a Transition:

  1. To create a transition between two activities, hold down your right mouse button and drag your mouse from a source activity to a destination activity.

    Note: Overlapping transitions appear in a different color than single, non-overlapping transitions.

  2. To edit a transition, select the transition.

  3. To reposition a transition label, simply select the label with your mouse and drag it to its new position. The label snaps onto the transition.

  4. You can bring up the following menu of editing options at any time by selecting a transition with your mouse and clicking on the right mouse button:

  5. To bend a transition, create a vertex point by selecting the transition and dragging the transition as you hold down your left mouse button. You can reposition any vertex point to create a bend in the transition.

  6. You can create a transition that loops back to its source activity node in one of two ways:

  7. To remove a single vertex point from a transition, select the vertex and drag it over another vertex to combine the two points.

arrow icon   To Display a Process Overview:

  1. Place your cursor in the process window and choose Overview from the right mouse button menu.

  2. An Overview dialog window of your process appears.

    The upper pane of the window shows a size-reduced sketch of your entire process, while the bottom pane is a list of the activities in your process.

  3. You can resize the Overview dialog window to get a better view of the process sketch.

  4. A cross hairs cursor that you can drag appears in the process sketch pane. Use the cross hairs cursor to pinpoint an area in your process that you want the process window to display.

  5. Single click on an activity in the lower pane to move the cross hairs cursor to that activity within the sketch. Choose OK to close the dialog window and to jump to that activity in the process window.

    You can also drag and double-click on the cross hairs cursor in the upper pane to close the dialog window and to jump to the resulting region in the process window.

arrow icon   To Print a Process:

  1. Display the process window containing the process you wish to print.

  2. With the process window selected as the active window, choose Print Diagram from the File menu or from the right mouse button menu.

    The Print Diagram option captures your process diagram as a picture (metafile), enlarges it to the correct size to print and sends it to a printer. If your diagram is large, it may span more that one page when printed. However, depending on the printer driver you use, you may get a Print dialog box that lets you scale your image down to one page for printing.

    Note: If your process diagram uses a font that the printer cannot find, your printer driver may either substitute a similar font or not print any text.

arrow icon   To Copy a Process Diagram to the Clipboard:

  1. Display and make the process window containing the process you wish to copy active.

  2. Choose Copy Design from the Edit menu or from the right mouse button menu.

    This copies the process to the clipboard in the form of a metafile and a bitmap diagram.

  3. To paste the metafile-version or bitmap-version of the process diagram into another application window, you should consult the other application's documentation on how to paste metafiles or bitmaps.

    To edit a bitmap image, you must paste the image into an application that can edit bitmaps.

arrow icon   To Validate a Process Definition:

  1. Choose Verify from the File menu to validate all process definitions for the currently selected data store.

  2. The following list is an example of some of the validation that the Verify command performs:

    Important: You should always validate any new process definition you create as it helps you to identify any potential problems with the definition that might prevent it from executing successfully.

Related Topics