By checking for an item attribute called WF_ADMINISTRATOR in your errored process' item type, the Initialize Error activity lets you specify who you want a notification to be sent to in the case of an error in your specific process without modifying the error process.
For example, suppose you have a requisition approval workflow and you want the purchasing administrator, not the system administrator, to resolve any problems that arise from this workflow. You can define an item attribute called WF_ADMINISTRATOR in the item type that owns your requisition approval workflow and set WF_ADMINISTRATOR to the purchasing administrator's role, which may be PO_ADMIN.
Note: The notification message's embedded URL link displays the process in error in the Workflow Monitor with full administrator privileges. You can perform actions such as retrying, skipping or rolling back part of your process within the Workflow Monitor to resolve the error.
The subject and body of the Retry As Only Option message is as follows:
Subject: Error in Workflow &ERROR_ITEM_TYPE/&ERROR_ITEM_KEY
Body: An Error occurred in the following Workflow.
Item Type = &ERROR_ITEM_TYPE
Item Key = &ERROR_ITEM_KEY
User Key =&USER_KEY
Error Name = &ERROR_NAME
Error Message = &ERROR_MESSAGE
Error Stack = &ERROR_STACK
Activity Id = &ERROR_ACTIVITY_ID
Activity Label = &ERROR_ACTIVITY_LABEL
Result Code = &ERROR_RESULT_CODE
Notification Id = &ERROR_NOTIFICATION_ID
Assigned User = &ERROR_ASSIGNED_USER
The NTF with RETRY Only notification activity has a dynamic timeout value assigned to it. It checks the item type of the process in error for an item attribute that has an internal name called ERROR_TIMEOUT. ERROR_TIMEOUT must be an attribute of type NUMBER. The Workflow Engine interprets the timeout value of this attribute as a relative offset from the begin date of the activity, in the unit of MINUTES. If ERROR_TIMEOUT contains a null value, a value of zero, or is not defined at all, then NTF with RETRY Only has no timeout.
The Error Still Active activity calls a PL/SQL procedure called WF_STANDARD.CHECKERRORACTIVE. The purpose of the Error Still Active activity is to determine whether the errored process is still in error before continuing with the error handling. If it is, Error Still Active returns TRUE and the Workflow Engine transitions back to the NTF with RETRY Only notification activity to send another notification to the administrator. If the errored process is no longer in error, this activity returns False and the error handling process ends, as modelled in the process diagram.