Skip Headers

Oracle Workflow API Reference
Release 2.6.3

Part Number B10286-02
Previous Next       Contents Index Glossary
         Previous  Next          Contents  Index  Glossary

Error

PL/SQL Syntax

function Error

(p_subscription_guid in raw,
p_event in out wf_event_t) return varchar2;

Description

Returns the status code ERROR. Additionally, when you assign this function as the rule function for a subscription, you must enter a text string representing the internal name of an error message in the Parameters field for the subscription. When the subscription is executed, Error() will set that error message into the event message using setErrorMessage(). See: setErrorMessage.

The text string you enter in the Parameters field must be a valid name of an Oracle Workflow error message. The names of the error messages provided by Oracle Workflow are stored in the NAME column of the WF_RESOURCES table for messages with a type of WFERR.

You can use Error() as a subscription rule function if you want to send the system administrator an error notification with one of the predefined Workflow error messages whenever a particular event is raised.

For example, define a subscription to the relevant event with the rule function WF_RULE.Error and enter WFSQL_ARGS in the Parameters field. Then raise the event to trigger the subscription. Because Error() returns the status code ERROR, the Event Manager places the event message on the WF_ERROR queue and subscription processing for the event is halted. When the listener runs on the WF_ERROR queue, an error notification will be sent to the system administrator with the message "Invalid value(s) passed for arguments," which is the display name of the WFSQL_ARGS error message.

Note: Error() does not raise any exception to the calling application when it completes normally.

Arguments (input)

p_subscription_ guid The globally unique identifier of the subscription.
p_event The event message.

         Previous  Next          Contents  Index  Glossary


Oracle Logo
Copyright © 2003 Oracle Corporation.

All rights reserved.