Skip Headers

Oracle Workflow Developer's Guide
Release 2.6.4
Part Number B15853-04
Go to Table of Contents
Contents
Go to previous page
Previous
Go to next page
Next

Predefined Workflow Activities

This chapter tells you how to use Oracle Workflow's predefined activities.

This chapter covers the following topics:

Standard Activities

Oracle Workflow provides some generic activities you can use to control your process. The activities are associated with the Standard item type but can be used within any process you define. The Standard item type is automatically installed on your Oracle Workflow server. You can also access the Standard item type from the file wfstd.wft located on your PC in the <ORACLE_HOME>\Wf\data\<language> directory.

Note: Predefined activities are also available for the predefined workflows shipped with Oracle Applications. For more information on Oracle Applications-specific workflow activities, consult the documentation or help for that specific Oracle Applications product.

Note: If you want to drag an activity into a process, where the activity is in a different data store than the process you are dragging it to, then you must first copy the item type that the activity belongs to into the same data store as the process. Suppose you are modifying a process that is stored in wfexample.wft and you want to add some standard activities into the process that are stored in wfstd.wft. First you need to open both files as data stores in Oracle Workflow Builder, then you need to copy the Standard item type in wfstd and paste it into the wfexample data store. Now you can drag any standard activity in the wfexample data store into your process.

Related Topics

And/Or Activities

Comparison Activities

Compare Execution Time Activity

Wait Activity

Block Activity

Defer Thread Activity

Launch Process Activity

Noop Activity

Loop Counter Activity

Start Activity

End Activity

Role Resolution Activity

Notify Activity

Vote Yes/No Activity

Master/Detail Coordination Activities

Assign Activity

Get Monitor URL Activity

Get Event Property Activity

Set Event Property Activity

Compare Event Property Activity

XML Get Tag Value Activity

XML Compare Tag Value Activities

XML Transform Activity

And/Or Activities

In cases where multiple parallel branches transition to a single node, you can decide whether that node should transition forward when any of those parallel branches complete or when all of the parallel branches complete. Use the And activity as the node for several converging branches to ensure that all branches complete before continuing. Use the Or activity as the node for several converging branches to allow the process to continue whenever any one of the branches completes.

Comparison Activities

The comparison activities provide a standard way to compare two numbers, dates, or text strings.

All the Comparison activities call a PL/SQL procedure named WF_STANDARD.COMPARE.

Activity Attributes

Each comparison activity has two activity attributes:

The comparison activities use the Comparison lookup type for a result code. Possible values are "Greater Than," "Less Than," "Equal," or "Null," if the item type attribute is null. You can guide your workflow process based on how the value of an item type attribute compares to a given value that you set. See: To Define Activity Attribute Values.

Compare Execution Time Activity

The Compare Execution Time activity provides a standard way to compare the elapsed execution time of a process with a constant test time.

The Compare Execution Time activity calls a PL/SQL procedure named WF_STANDARD.COMPAREEXECUTIONTIME.

Activity Attributes

The Compare Execution Time activity has two activity attributes:

The activity uses the Comparison lookup type for a result code. Possible values are "Greater Than," "Less Than," "Equal," or "Null," if the test time is null. See: To Define Activity Attribute Values.

Wait Activity

The Wait activity pauses the process for the time you specify. You can either wait until:

This activity calls the PL/SQL procedure named WF_STANDARD.WAIT.

Note: You must run a background engine for deferred activities to determine when the wait time has passed. The background engine then completes the Wait activity so that the process can continue. See: Setting Up Background Engines, Oracle Workflow Administrator's Guide.

Activity Attributes

The Wait activity has six activity attributes:

Note: For the Day of Month and Day of Week wait modes, if a process transitions to a Wait activity during the specified day in the current month or week, the Wait activity pauses until that day in the following month or week, because the beginning of the day has already passed. To pause the activity until the end of a particular day, use the Absolute Date wait mode and set the Absolute Date attribute to the time 00:00:00 on the next day. For example, if you want to pause until the end of the last day of a month, set the Absolute Date attribute to the time 00:00:00 on the first day of the next month.

See: To Define Activity Attribute Values.

Block Activity

The Block activity lets you pause a process until some external program or manual step completes and makes a call to the CompleteActivity Workflow Engine API. Use the Block activity to delay a process until some condition is met, such as the completion of a concurrent program. Make sure your program issues a CompleteActivity call when it completes to resume the process at the Block activity. See: CompleteActivity, Oracle Workflow API Reference.

This activity calls the PL/SQL procedure named WF_STANDARD.BLOCK.

Defer Thread Activity

The Defer Thread activity defers the subsequent process thread to the background queue without requiring you to change the cost of each activity in that thread to a value above the Workflow Engine threshold. This activity always interrupts the process thread by causing a disconnect to occur in the current database session, even if the thread is already deferred.

This activity calls the PL/SQL procedure named WF_STANDARD.DEFER.

Launch Process Activity

The Launch Process activity lets you launch another workflow process from the current process. This activity calls the PL/SQL procedure named WF_STANDARD.LAUNCHPROCESS.

Activity Attributes

The Launch Process activity has six activity attributes:

See: To Define Activity Attribute Values.

Noop Activity

The Noop activity acts as a place holder activity that performs no action. You can use this activity anywhere you want to place a node without performing an action. You can change the display name of this activity to something meaningful when you include it in a process, so that it reminds you of what you want this activity to do in the future. This activity calls the PL/SQL procedure named WF_STANDARD.NOOP.

Loop Counter Activity

Use the Loop Counter activity to limit the number of times the Workflow Engine transitions through a particular path in a process. The Loop Counter activity can have a result of Loop or Exit.

This Loop Counter activity calls the PL/SQL procedure named WF_STANDARD.LOOPCOUNTER.

Activity Attribute

The Loop Counter activity has an activity attribute called Loop Limit. If the number of times that the Workflow Engine transitions to the Loop Counter activity is less than the value specified in Loop Limit, the Loop Counter activity will complete with a result of Loop and the engine will take the 'Loop' transition to the next activity. If the number of times that the Workflow Engine transitions to the Loop Counter activity exceeds the value of Loop Limit, the activity will complete with a result of Exit and the engine will take the 'Exit' transition to an alternative activity.

For example, suppose your workflow process contains a branch of activities that can be transitioned to from multiple source activities, and you want to ensure that that particular branch of activities gets executed just once in the process. Include a Loop Counter activity as the first activity in that branch and specify the Loop Limit activity attribute value as 1. Also draw an 'Exit' transition from the Loop Counter activity to an activity that you want the engine to execute if the Loop Counter activity is visited more than once, as shown in the diagram below.

Example Loop Counter Activity in a Branch

the picture is described in the document text

Additionally, for example, as shown in the diagram below, you can include a Loop Counter activity as the initial activity in a loop. The value you specify for the Loop Limit activity attribute will designate the number of times the engine is allowed to traverse through the loop. If the number of visits to the Loop Counter activity exceeds the value set in Loop Limit, then the process moves along the 'Exit' transition to the designated activity.

In this example, the engine moves from the Loop Counter activity through Activities 1, 2, 3, and 4 in the loop. If the result of Activity 4 is 'Accepted,' the process moves along the 'Accepted' transition. Otherwise, if the result is 'Rejected,' the process moves along the 'Rejected' transition to return to the Loop Counter activity. If the item is rejected multiple times, once the number of visits to the Loop Counter activity exceeds the Loop Limit value, the process moves along the 'Exit' transition and ends.

Example Loop Counter Activity in a Loop

the picture is described in the document text

See: To Define Activity Attribute Values.

Start Activity

The Start activity marks the start of a process and does not perform any action. Although it is not necessary, you may include it in your process diagram to visually mark the start of a process as a separate node. This activity calls the PL/SQL procedure named WF_STANDARD.NOOP.

End Activity

The End activity marks the end of a process and does not perform any action. You can use it to return a result for a completed process by specifying a Result Type for the activity. Although it is not necessary, you may include it in your process diagram to visually mark the end of your process as a separate node. This activity calls the PL/SQL procedure named WF_STANDARD.NOOP.

Role Resolution Activity

The Role Resolution activity lets you identify a single user from a role comprised of multiple users. In a process diagram, place the Role Resolution activity in front of a notification activity and specify the performer of that notification activity to be a role consisting of several users. The Role Resolution activity selects a single user from that role and assigns the notification activity to that user.

This activity calls the PL/SQL procedure named WF_STANDARD.ROLERESOLUTION.

Activity Attributes

Use the Method activity attribute in the Role Resolution activity to specify how you want to resolve the role. A value of "Load Balance" compares how many open notifications from that activity each qualified user has and selects the user with the fewest open notifications from that activity. A value of "Sequential" selects a user from the role sequentially by determining the user that experienced the longest interval of time since last receiving a notification from that activity. See: To Define Activity Attribute Values.

Notify Activity

The Notify function activity lets you send a notification, where the message being sent is determined dynamically at runtime by a prior function activity. To use the Notify activity, you must model a prerequisite function activity into the process that selects one of several predefined messages for the Notify activity to send.

Important: Since the Notify activity is locked against modifications at access level 0, you cannot change the result type from its value of <None>. Therefore, the message that the function activity dynamically selects must not have a result type, that is, it can only be an informative message that does not solicit a response.

Important: If you want the Notify activity to send a message that requires a response, then you must copy and create your own version of the Notify activity. Since any one of several messages (with response attributes) can be sent by your version of the Notify activity, you must model into your process all the possible notification results that can be returned.

Note: If you want to define an activity that always sends the same message, you should define a notification activity and not use this Notify function activity.

The Notify activity calls a PL/SQL procedure named WF_STANDARD.NOTIFY.

Activity Attributes

The Notify activity has three activity attributes:

See: To Define Activity Attribute Values.

Vote Yes/No Activity

The Vote Yes/No activity lets you send a notification to a group of users in a role and tally the Yes/No responses from those users. The results of the tally determine the activity that the process transitions to next.

The Vote Yes/No activity, classified as a notification activity, first sends a notification message to a group of users and then performs a PL/SQL post-notification function to tally the users' responses (votes).

Activity Attributes

The Vote Yes/No activity has three activity attributes:

See: To Define Activity Attribute Values.

Related Topics

Voting Activity

Master/Detail Coordination Activities

The Master/Detail coordination activities let you coordinate the flow of master and detail processes. For example, a master process may spawn detail processes that need to be coordinated such that the master process continues only when every detail process has reached a certain point in its flow or vice versa.

When you spawn a detail process from a master process in Oracle Workflow, you are in effect creating a separate process with its own unique item type and item key. You define the master/detail relationship between the two processes by making a call to the Workflow Engine SetItemParent API after you call the CreateProcess API and before you call the StartProcess API when you create the detail process. See: SetItemParent, Oracle Workflow API Reference.

You can then use the two activities described below to coordinate the flow in the master and detail processes. One activity lets you pause a process and the other signals the halted process to continue. To use these activities, you place one activity in the master process and the other in each detail process.

Both activities contain two activity attributes that you use to identify the coordinating activity in the other process(es).

Wait for Flow Activity

Place this activity in a master or detail process to pause the flow until the other corresponding detail or master process completes a specified activity. This activity calls a PL/SQL procedure named WF_STANDARD.WAITFORFLOW. You can use multiple Wait for Flow activities in the same workflow process.

Activity Attributes

The Wait for Flow activity contains two activity attributes:

See: To Define Activity Attribute Values.

Continue Flow Activity

Use this activity to mark the position in the corresponding detail or master process where, upon completion, you want the halted process to continue. This activity calls a PL/SQL procedure named WF_STANDARD.CONTINUEFLOW.

When a Continue Flow activity is executed, the WF_STANDARD.CONTINUEFLOW procedure checks whether the corresponding Wait for Flow activity is associated with any other processes that have not yet completed their Continue Flow activities. If so, the waiting process keeps waiting for those other processes. If the Wait for Flow activity is not waiting for any other processes, then the WF_STANDARD.CONTINUEFLOW procedure completes the Wait for Flow activity so that the process that was waiting now continues to the next activity.

Activity Attributes

The Continue Flow activity contains two activity attributes:

See: To Define Activity Attribute Values.

Example

The following figures show an example of how these coordination activities can be used. In the master process example, after the process begins with the Start activity, the Start Detail Flows activity initiates several detail processes. The master process then completes Activity 1 before it pauses at the Wait For Flow activity. Wait For Flow is defined to wait for all its detail processes to complete a Continue Flow activity before allowing the master process to transition to Activity 2 and finally end. An example of one of the detail processes below shows that after the detail process begins with the Start activity, it completes Activity A. When it reaches the Continue Flow activity, it signals to the Workflow Engine that the master process can now continue from the Wait For Flow activity. The detail process itself then transitions to Activity B and finally ends.

Example Master Process

the picture is described in the document text

Example Detail Process

the picture is described in the document text

Note: You can include a Wait for Flow activity in a master process without including a Continue Flow activity in one or more of its corresponding detail processes. However, in this case you must ensure that all detail processes without a Continue Flow activity are entirely completed before the Workflow Engine attempts to continue the master process based on the coordination activities that you do include. That is, at least one of the following must occur after the detail processes without a Continue Flow activity are completed:

Otherwise, the Workflow Engine cannot properly coordinate the continuation of the master process.

If it does not matter when any of the detail processes complete before a master process continues (or when a master process completes before all the detail processes continue), then you simply omit both of the coordination activities from your master/detail processes.

Important: If you include a Continue Flow activity in a process, you must also include a Wait for Flow activity in its corresponding master or detail process as defined by the activity attributes in the Continue Flow activity.

Assign Activity

The Assign activity lets you assign a value to an item attribute. This activity calls the PL/SQL procedure named WF_STANDARD.ASSIGN.

Activity Attributes

The Assign activity has an activity attribute called Item Attribute. Use Item Attribute to choose the item attribute that you want to assign a value to. Depending on the item attribute's format type, use the Date Value, Numeric Value, or Text Value activity attribute to specify the value that you want to assign to the item attribute.

Get Monitor URL Activity

The Get Monitor URL activity generates the URL for the Workflow Monitor diagram window and stores it in an item attribute that you specify. This activity calls the PL/SQL procedure named WF_STANDARD.GETURL.

Activity Attributes

The Get Monitor URL activity has two activity attributes:

See: To Define Activity Attribute Values.

Get Event Property Activity

The Get Event Property activity lets you retrieve a property of an event message from the Business Event System and store the property value in an item attribute. This activity calls the PL/SQL procedure named WF_STANDARD.GETEVENTPROPERTY.

Activity Attributes

The Get Event Property activity has four activity attributes:

See: To Define Activity Attribute Values.

Set Event Property Activity

The Set Event Property activity lets you set the value of a property in an event message from the Business Event System. This activity calls the PL/SQL procedure named WF_STANDARD.SETEVENTPROPERTY.

Activity Attributes

The Set Event Property activity has six activity attributes:

Note: You must enter the value to set in the activity attribute that matches the data type of the event property you choose.

See: To Define Activity Attribute Values.

Compare Event Property Activity

The Compare Event Property activity lets you compare a property of an event message from the Business Event System with a test value that you specify. This activity calls the PL/SQL procedure named WF_STANDARD.COMPAREEVENTPROPERTY.

Activity Attributes

The Compare Event Property activity has six activity attributes:

The Compare Event Property activity uses the Comparison lookup type for a result code. Possible values are "Greater Than," "Less Than," "Equal," or "Null," if the test activity attribute value is null. You can guide your workflow process based on how the event property value compares to the test value. See: To Define Activity Attribute Values.

Note: You must enter the test value in the activity attribute that matches the data type of the event property you choose. If you enter the test value in an inappropriate activity attribute, the Compare Event Property activity returns the "Null" result code.

XML Get Tag Value Activity

Use the XML Get Tag Value activity to retrieve data from the contents of an event message from the Business Event System. This functionality is currently only available for the standalone version of Oracle Workflow. This activity retrieves the data contained within a particular XML tag set in the event message and stores the data in an item attribute that you specify. The XML Get Tag Value activity calls the external Java function named oracle.apps.fnd.wf.XMLGetTagValue.

Note: When the Workflow Engine encounters an external Java function activity, it places an entry on the 'Outbound' queue. To continue executing the activity, you must run the Java Function Activity Agent, which calls the appropriate Java function and places the result on the 'Inbound' queue. You must then run a background engine to process the 'Inbound' queue and complete the function activity. See: Setting Up the Java Function Activity Agent, Oracle Workflow Administrator's Guide and Setting Up Background Engines, Oracle Workflow Administrator's Guide.

Activity Attributes

The XML Get Tag Value activity has three activity attributes:

See: To Define Activity Attribute Values.

XML Compare Tag Value Activities

Use the XML Compare Tag Value activities to compare data from an event message received through the Business Event System with a test value. This functionality is currently only available for the standalone version of Oracle Workflow. These activities compare the data contained within a particular XML tag set in the event message with the test value that you specify.

All the XML Compare Tag Value activities call the external Java function named oracle.apps.fnd.wf.XMLCompareTag.

Note: When the Workflow Engine encounters an external Java function activity, it places an entry on the 'Outbound' queue. To continue executing the activity, you must run the Java Function Activity Agent, which calls the appropriate Java function and places the result on the 'Inbound' queue. You must then run a background engine to process the 'Inbound' queue and complete the function activity. See: Setting Up the Java Function Activity Agent, Oracle Workflow Administrator's Guide and Setting Up Background Engines, Oracle Workflow Administrator's Guide.

Activity Attributes

Each XML Compare Tag Value activity has three activity attributes:

The XML Compare Tag Value activities use the Comparison lookup type for a result code. Possible values are "Greater Than," "Less Than," "Equal," or "Null," if the test activity attribute value is null. You can guide your workflow process based on how the event message data compares to the test value. See: To Define Activity Attribute Values.

XML Transform Activity

The XML Transform activity lets you apply an XML style sheet to the payload of an event message from the Business Event System. This functionality is currently only available for the standalone version of Oracle Workflow. The resulting document is stored in an item attribute of type event. This activity calls the external Java function named oracle.apps.fnd.wf.XSLTTransform.

Note: When the Workflow Engine encounters an external Java function activity, it places an entry on the 'Outbound' queue. To continue executing the activity, you must run the Java Function Activity Agent, which calls the appropriate Java function and places the result on the 'Inbound' queue. You must then run a background engine to process the 'Inbound' queue and complete the function activity. See: Setting Up the Java Function Activity Agent, Oracle Workflow Administrator's Guide and Setting Up Background Engines, Oracle Workflow Administrator's Guide.

Activity Attributes

The XML Transform activity has three activity attributes:

See: To Define Activity Attribute Values.

Concurrent Manager Standard Activities

Oracle Applications provides some generic activities you can use to control your process if you are using the version of Oracle Workflow embedded in Oracle Applications. These activities are associated with the Concurrent Manager Functions item type but can be used within any process you define:

The Concurrent Manager Functions item type is automatically installed on your Oracle Applications workflow server. You can also access this item type from the file fndwfaol.wft located in the $FND_TOP/admin/import directory.

Execute Concurrent Program Activity

The Execute Concurrent Program activity is available only in the version of Oracle Workflow embedded in Oracle Applications. It submits an Oracle Applications concurrent program from your workflow process and waits for it to complete, at which point it updates the status of the activity and returns execution of the workflow process to the background engine. The concurrent program can complete with any of the following results, as defined by the Concurrent Program Status lookup type: NORMAL, ERROR, WARNING, CANCELLED, or TERMINATED. You should make sure all of these results are modelled into your process diagram.

Important: To use the Execute Concurrent Program activity, you must ensure that the background engine is set up to run.

Important: Generally, the context for your process' item type is always set if your session is initiated from an Oracle Applications form. However, if an interrupt occurs in your session, for example, due to a notification or blocking activity, you must ensure that the context is set by calling FND_GLOBAL.APPS_INITIALIZE(user_id, resp_id, resp_appl_id) in SET_CTX mode in your Selector/Callback function. See: Standard API for an Item Type Selector or Callback Function and FNDSQF Routine APIs, Oracle Applications Developer's Guide.

The Execute Concurrent Program activity calls the standard Oracle Application Object Library API FND_WF_STANDARD.EXECUTECONCPROGRAM.

Activity Attributes

The Execute Concurrent Program activity has the following activity attributes:

See: To Define Activity Attribute Values.

Submit Concurrent Program Activity

The Submit Concurrent Program activity is available only in the version of Oracle Workflow embedded in Oracle Applications. It submits an Oracle Applications concurrent program from your workflow process, but does not wait for it to execute or complete. Once this activity submits a concurrent request, the Workflow Engine continues with the next activity in the process.

Important: Generally, the context for your process' item type is always set if your session is initiated from an Oracle Applications form. However, if an interrupt occurs in your session, for example, due to a notification or blocking activity, you must ensure that the context is set by calling FND_GLOBAL.APPS_INITIALIZE(user_id, resp_id, resp_appl_id) in SET_CTX mode in your Selector/Callback function. See: Standard API for an Item Type Selector or Callback Function.

The Submit Concurrent Program activity calls the standard Oracle Application Object Library API FND_WF_STANDARD.SUBMITCONCPROGRAM.

Activity Attributes

The Submit Concurrent Program activity has the following activity attributes:

See: To Define Activity Attribute Values.

Wait for Concurrent Program Activity

The Wait for Concurrent Program activity is available only in the version of Oracle Workflow embedded in Oracle Applications. If you submit a concurrent program from your workflow process, you can use the Wait for Concurrent Program activity as a means of blocking the process from further execution until the concurrent program completes. When the concurrent program completes, this activity clears the block by updating the status of the activity and returning execution of the workflow process to the background engine. The concurrent program can complete with any of the following results, as defined by the Concurrent Program Status lookup type: NORMAL, ERROR, WARNING, CANCELLED, or TERMINATED. You should make sure all of these results are modelled into your process diagram.

Important: To use the Wait for Concurrent Program activity, you must ensure that the background engine is set up to run.

The Wait for Concurrent Program activity calls the standard Oracle Application Object Library API FND_WF_STANDARD.WAITFORCONCPROGRAM.

Activity Attributes

The Wait for Concurrent Program activity has one activity attribute called Request ID, which should be set to the concurrent program request ID that you are waiting for to complete. See: To Define Activity Attribute Values.