Skip Headers

Oracle Workflow API Reference
Release 2.6.3

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

Warning

PL/SQL Syntax

function Warning

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

Description

Returns the status code WARNING. 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, Warning() 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 Warning() as a subscription rule function if you want to send the system administrator a warning 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.Warning and enter WFSQL_ARGS in the Parameters field. Then raise the event to trigger the subscription. Because Warning() returns the status code WARNING, the Event Manager places the event message on the WF_ERROR queue, but subscription processing for the event still continues. When the listener runs on the WF_ERROR queue, a warning 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: Warning() 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.