Results for “apply_rule_bulk”
10 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
FUN_RULE_PUB is the public PL/SQL package that exposes the Oracle E-Business Suite Oracle Financials "Rule Engine" to external consumers. It resides in the APPS schema, is declared with AUTHID CURRENT_USER, and carries an API classification of PUB, indicating that it is a supported, externally callable interface rather than an internal helper. The package implements a generic, metadata-driven evaluation framework: callers supply a set of named parameters and an application/object identifier, and the engine returns the result of matching those parameters against user-defined rules stored in the FUN_RULE_* tables. Although the package belongs to the Financials product family (product short name "fun"), its design is application-agnostic, and the header comments demonstrate its intended use through an example that passes an application short name (for example "SQLAP") together with a customized object name.
The package tracks evaluation state through a substantial set of package-level variables, including m_ruleDetailId, m_resultApplicationId, m_ruleName, m_resultValue, m_resultValueDataType, m_attributeCategory, m_multiRuleResultFlag, m_useDefaultValueFlag, m_noRulesSatisfied, fifteen generic attribute slots (m_attribute1 through m_attribute15), m_ruleObjectType, m_ruleObjectId, and flexfield-related fields. These globals allow a caller to drive an evaluation, then retrieve individual pieces of the result through dedicated getter functions.
Key Procedures and Functions
The package documents 35 procedures and functions. The principal entry points are:
- INIT_PARAMETER_LIST — initializes the parameter list used for a rule evaluation, resetting prior state.
- SET_INSTANCE_CONTEXT — establishes the instance context under which rules are evaluated.
- ADD_PARAMETER — adds a named input parameter and its value to the parameter list prior to evaluation.
- APPLY_RULE — the core evaluation routine; applies the applicable rules for a given application and rule object and stores the outcome in package state.
- APPLY_RULE_WRAPPER and APPLY_RULE_BULK — wrapper and bulk-processing variants of the core evaluation, the latter supporting set-based evaluation of many rule invocations.
- GET_STRING, GET_NUMBER, GET_DATE — typed accessors that return the evaluation result converted to the requested data type.
- GET_RULE_DETAIL_ID, GET_RESULT_APPLICATION_ID, GET_RULE_NAME, GET_ATTRIBUTE_CATEGORY — accessors returning rule identity and categorisation metadata.
- GET_ATTRIBUTE1 through GET_ATTRIBUTE7 (and the remaining attribute accessors) — return the generic attribute values populated by the matched rule.
No parameter signatures are asserted here; consumers should consult the package specification for exact argument lists.
Tables Accessed
The package reads and, where applicable, writes the following tables through APPS synonyms:
- FUN_RULE_DETAILS, FUN_RULE_CRIT_PARAMS_B and FUN_RULE_CRITERIA — the rule definition and criteria structures that drive evaluation.
- FUN_RULE_OBJECTS_B — defines the custom rule objects against which rules are authored.
- FUN_RULE_PARAM_VALUES — holds parameter values associated with rule evaluation.
- FUN_RULE_BULK_RESULT_GT — a global temporary table used to hold bulk evaluation results.
- FND_APPLICATION and FND_DESCRIPTIVE_FLEXS — application and descriptive flexfield metadata, supporting the application identifier and flexfield fields referenced in package state.
- DBMS_SQL and PLITBLM — dynamic SQL and PL/SQL table utilities used internally by the engine.
Usage Notes
FUN_RULE_PUB is typically invoked from Forms, concurrent programs, and custom PL/SQL code that needs to apply configurable business rules without hard-coding logic. The canonical usage pattern, as shown in the package header, is to call INIT_PARAMETER_LIST, add each parameter with ADD_PARAMETER, and then call APPLY_RULE, retrieving the outcome through the GET_* accessors. In Oracle EBS 12.1.1 and 12.2.2 the package is referenced by seven other packages, confirming its role as a shared service. Because it is a PUB API, direct calls are supported, but callers should assume AUTHID CURRENT_USER semantics and ensure the executing schema has appropriate privileges on the underlying FUN_RULE tables.
-
PACKAGE: APPS.FUN_RULE_PUB 12.1.1
-
PACKAGE: APPS.FUN_RULE_PUB 12.2.2