How To Raise Error In Oracle Workflow
Contents |
arg2 IN VARCHAR2 DEFAULT wf_core.context in oracle workflow '*none*', arg3 IN VARCHAR2 DEFAULT '*none*', arg4 IN VARCHAR2
Wf_core.context Table
DEFAULT '*none*', arg5 IN VARCHAR2 DEFAULT '*none*'); Description Adds an entry to the error stack to provide context information that helps locate the source of an error. Use this procedure with predefined errors raised by calls to TOKEN( ) and RAISE( ), with custom-defined exceptions, or even without exceptions whenever an error condition is detected. Arguments (input) pkg_name Name of the procedure package. proc_name Procedure or function name. arg1 First IN argument. argn nth IN argument. Example 1 /*PL/SQL procedures called by function activities can use the WF_CORE APIs to raise and catch errors the same way the Workflow Engine does.*/ package My_Package isprocedure MySubFunction( arg1 in varchar2, arg2 in varchar2)is...begin if (
correct error number and token substituted message for the name of the error message provided. Calls to TOKEN( ) and RAISE( ) raise predefined errors for Oracle Workflow that are stored in the WF_RESOURCES table. The error messages contain tokens that need to be replaced with relevant values https://docs.oracle.com/cd/B12037_01/workflow.101/b10286/corapi06.htm when the error message is raised. This is an alternative to raising PL/SQL standard exceptions or custom-defined exceptions. Error messages for Oracle Workflow are initially defined in message files (.msg). The message files are located in the res/
to the caller, since the caller generally does not know how to respond to the error. In fact, the caller may be a background engine with no human operator. Instead, Oracle Workflow lets you define https://docs.oracle.com/cd/B14099_19/integrate.1012/b12161/errh01.htm the processing you want to occur in case of an error by specifying an error handling process when you create your workflow process in Oracle Workflow Builder. At design time, you can assign an error handling process for http://web.deu.edu.tr/doc/oracle/B19306_01/workflow.102/b15853/T361836T362426.htm a process, function, or event activity in the activity's Details property page. You must specify the internal names of both the item type that owns the error handling process and the error handling process itself. See: To in oracle Define Optional Activity Details. Oracle Workflow provides a special item type called System: Error, which contains error processes called Default Error process and Retry-only process that you can use for generic error handling in any of your processes. However, you cannot modify the error processes in the System: Error item type. If you want to incorporate functionality that is not available in these error processes, you should create your own custom error handling process in your in oracle workflow own item type. An error process can branch based on error codes, send notifications, and attempt to deal with the error using automated rules for resetting, retrying, or skipping the failed activity. Note: Rather than relying on an error process to handle errors due to specific business rule incompatibilities, you should try to model those situations into your workflow process definition. For example, if a function activity can potentially encounter an error because a business prerequisite is not met, you might model your process to send a notification to an appropriate role to correct that situation if it occurs, so that the workflow process can progress forward. If you do not model this situation into your workflow process, and instead rely on the error to activate an error process, the entire workflow process will have an 'Error' status and will halt until a workflow administrator handles the error. At runtime, the Workflow Engine traps errors produced by function activities by setting a savepoint before each function activity. If an activity produces an unhandled exception, the engine performs a rollback to the savepoint, and sets the activity to the ERROR status. Note: For this reason, you should never commit within the PL/SQL procedure of a function activity. The Workflow Engine never issues a commit as it is the responsibility of the calling application to commit. The Wor
Part Number B15853-01 Contents Previous Next Error Handling Error Handling Oracle Workflow provides default error handling for both workflow processes and event subscription processing. The default handling is defined by error processes provided in a special item type called System: Error, and, for events, by a special subscription to the Unexpected event with a source type of Error. You can also choose to define your own custom error handling by creating custom error processes and subscriptions. Related Topics Error Handling for Workflow Processes Error Handling for Event Subscription Processing System: Error Item Type and Item Attributes Default Error Process Retry-only Process Default Event Error Process Error Handling for Workflow Processes Errors that occur during workflow execution cannot be directly returned to the caller, since the caller generally does not know how to respond to the error. In fact, the caller may be a background engine with no human operator. Instead, Oracle Workflow lets you define the processing you want to occur in case of an error by specifying an error handling process when you create your workflow process in Oracle Workflow Builder. At design time, you can assign an error handling process for a process, function, or event activity in the activity's Details property page. You must specify the internal names of both the item type that owns the error handling process and the error handling process itself. See: To Define Optional Activity Details. Details Property Page Oracle Workflow provides a special item type called System: Error, which contains error processes called Default Error process and Retry-only process that you can use for generic error handling in any of your processes. However, you cannot modify the error processes in the System: Error item type. If you want to incorporate functionality that is not available in these error processes, you should create your own custom error handling process in your own item type. An error process can branch based on error codes, send noti