Oracle Workflow API Reference Release 2.6.3 Part Number B10286-02 |
Previous | Next | Contents | Index | Glossary |
procedure HandleError
(itemtype in varchar2,
itemkey in varchar2,
activity in varchar2,
command in varchar2,
result in varchar2);
Java Syntax
public static boolean handleError
(WFContext wCtx,
String itemType,
String itemKey,
String activity,
String command,
String result)
Description
This procedure is generally called from an activity in an ERROR process to handle any process activity that has encountered an error.
You can also call this procedure for any arbitrary activity in a process, to rollback part of your process to that activity. The activity that you call this procedure with can have any status and does not need to have been executed. The activity can also be in a subprocess. If the activity node label is not unique within the process you may precede the activity node label name with the internal name of its parent process. For example, <parent_process_internal_name>:<label_name>.
This procedure clears the activity specified and all activities following it that have already been transitioned to by reexecuting each activity in 'Cancel' mode. For an activity in the 'Error' state, there are no other executed activities following it, so the procedure simply clears the errored activity.
Once the activities are cleared, this procedure resets any parent processes of the specified activity to a status of 'Active', if they are not already active.
The procedure then handles the specified activity based on the command you provide: SKIP or RETRY.
Arguments (input)
wCtx | Workflow context information. Required for the Java method only. See: Oracle Workflow Context. |
item_type or itemType | A valid item type. |
item_key or itemKey | A string generated from the application object's primary key. The string uniquely identifies the item within an item type. The item type and key together identify the process. |
activity | The activity node that encountered the error or that you want to undo. Provide the label name of the activity node. If the activity node 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>. |
command | One of two commands that determine how to handle the process activity: |
SKIP--do not reexecute the activity, but mark the activity as complete with the supplied result and continue execution of the process from that activity. | |
RETRY--reexecute the activity and continue execution of the process from that activity. | |
result | The result you wish to supply if the command is SKIP. |
Note: An item's active date and the version number of the process that the item is transitioning through can never change once an item is created. Occasionally, however, you may want to use HandleError to manually make changes to your process for an existing item.
If the changes you make to a process are minor, you can use HandleError to manually push an item through activities that will error or redirect the item to take different transitions in the process.
If the changes you want to make to a process are extensive, then you need to perform at least the following steps:
Previous | Next | Contents | Index | Glossary |