Search Results wf_rule




Overview

APPS.WF_RULE is the Oracle Workflow rule evaluation engine that underpins event subscription processing and business event handling across the E-Business Suite. Its principal business function is to evaluate rule functions referenced by event subscriptions, determine whether a subscribing rule returns a TRUE or FALSE result, and drive the appropriate response — raising notifications, generating errors, or dispatching further events. In the Oracle Workflow architecture, subscriptions associate a business event with a rule function expressed in PL/SQL; WF_RULE provides the runtime infrastructure that parses subscription metadata, executes the designated rule, and interprets the outcome. Because it is a package body in the APPS schema with status VALID, it is a shipped, supported component of the Workflow product family and is loaded into both 12.1.1 and 12.2.2 environments as part of the standard Oracle Workflow installation. The package is documented in ETRM with an API classification of OTHER, indicating it is primarily an internal engine rather than a formally published extension API, although several of its routines are callable by custom code.

Key Procedures and Functions

The package exposes fourteen documented procedures and functions, which fall into several functional groups.

  • Logging and diagnostics: LOG, ERROR, WARNING, and SUCCESS provide leveled diagnostic output routed through WF_LOG_PKG and FND_LOG. These routines allow rule evaluation activity, exceptions, and successful outcomes to be recorded consistently with Workflow's logging infrastructure.
  • Rule evaluation: DEFAULT_RULE, DEFAULT_RULE2, DEFAULT_RULE3, DEFAULT_RULE_OR, INSTANCE_DEFAULT_RULE, and ERROR_RULE implement the standard rule bodies used when a subscription does not supply a custom rule function or when default behavior must be applied. ERROR_RULE specifically handles error conditions raised during event processing, while INSTANCE_DEFAULT_RULE applies default rules scoped to a specific event instance.
  • Parameter handling: SETPARAMETERSINTOPARAMETERLIST supports transfer of rule parameters into the WF_PARAMETER_LIST_T structure consumed during rule execution.
  • Notification and dispatch: SENDNOTIFICATION, WORKFLOW_PROTOCOL, and DEFAULT_GENERATE support the downstream actions triggered by a rule — generating notifications, applying the workflow protocol for event delivery, and generating default event responses respectively.

Because the package body is documented without parameter signatures, callers should consult the ETRM object listing or the package specification for exact invocation syntax.

Tables Accessed

WF_RULE operates against a focused set of Workflow dictionary objects, referenced through APPS synonyms. WF_EVENT_SUBSCRIPTIONS is read to retrieve the rule function and parameters associated with a business event subscription. WF_EVENT_T and WF_PARAMETER_LIST_T are used as the in-memory/PL/SQL table types carrying event payload and parameter data through the evaluation path. WF_AGENT_T supplies agent definitions for notification and routing. WF_ERROR_PROCESSES_S provides error process configuration used by ERROR_RULE. DBMS_LOB and PLITBLM are invoked for large-object handling and PL/SQL table management, and DUAL supports singleton expression evaluation. The package does not persist rule results in its own tables; its writes occur indirectly through notification generation and logging.

Usage Notes

WF_RULE is invoked automatically by the Business Event System and Workflow Engine, not by end users. The Workflow Engine (WF_ENGINE) and event subscription processing call into it whenever an event is raised that has subscriptions requiring rule evaluation. Customer rule functions modeled on the DEFAULT_RULE pattern are typically registered as subscription rule functions in the Event Manager. Direct calls from custom PL/SQL are possible for the logging routines and the default rule functions, but because the documented metadata shows no dependent database objects and no extension points in its own specification, customization should be confined to writing subscription rule functions that follow the WF_RULE conventions rather than modifying the package itself. Developers troubleshooting event subscriptions in 12.1.1 or 12.2.2 should treat WF_RULE as the authoritative evaluator and use its LOG, WARNING, and ERROR output as the primary diagnostic trail.