Results for “fun_rule_pub”
50+ results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
FUN_RULE_PUB is the public rule engine package of the Oracle E-Business Suite Financials (FUN) module, responsible for evaluating configurable business rules against descriptive flexfield (DFF) data across financial applications. The package body implements a generic, metadata-driven rule evaluation framework in which rules are defined declaratively as rows in the FUN_RULE_OBJECTS and FUN_RULE_DETAILS tables, and applied at runtime to validate, derive, or default flexfield segment values. In a 12.1.1 or 12.2.2 environment, the package is a central infrastructure component for features such as intercompany balancing, withholding tax defaulting, and other flexfield-driven validation logic.
The package operates on a key architectural pattern: the caller initializes a parameter list, optionally sets an instance (DFF) context and organization context, adds rule parameters, and then invokes APPLY_RULE or APPLY_RULE_BULK. Internally, the package builds dynamic SQL via DBMS_SQL against the rule definition tables, evaluates each active rule detail in sequence, and returns a result set of type fun_rule_results_table. Rules are filtered by rule object name and application ID, with optional instance label and org ID predicates selected by two distinct SQL templates (the standard form and the multi-org-aware, instance-context form).
Key Procedures and Functions
The public API exposes 35 documented procedures and functions:
- INIT_PARAMETER_LIST — resets and initializes the private global parameter list (g_parameter_list, g_parameter_count) prior to a rule evaluation session.
- SET_INSTANCE_CONTEXT — establishes the descriptive flexfield instance label, org ID, and instance context flag (m_instance_label, m_org_id, m_instance_context) used to qualify which rule details apply.
- ADD_PARAMETER — appends a name/value parameter pair to the parameter list for binding into the rule detail query and criteria evaluation.
- APPLY_RULE / APPLY_RULE_WRAPPER / APPLY_RULE_BULK — the core evaluation entry points. APPLY_RULE evaluates a single rule object and returns a result table; APPLY_RULE_WRAPPER provides a convenience wrapper around single-rule invocation; APPLY_RULE_BULK evaluates rules across a set of records, populating the bulk result global temporary table.
- GET_STRING, GET_NUMBER, GET_DATE — typed accessors that extract and convert result values from the evaluated rule result table.
- GET_RULE_DETAIL_ID, GET_RULE_NAME, GET_RESULT_APPLICATION_ID — metadata accessors returning identifying attributes of the evaluated rule detail, rule object, and owning application.
- GET_ATTRIBUTE_CATEGORY and GET_ATTRIBUTE1 through GET_ATTRIBUTE7 — accessors exposing descriptive flexfield attribute columns captured in the rule result, allowing callers to inspect context-sensitive DFF values.
Tables Accessed
The package reads and writes the following objects through APPS synonyms:
- FUN_RULE_OBJECTS_B / FUN_RULE_OBJECTS_VL — rule object definitions (query filtered on RULE_OBJECT_NAME and APPLICATION_ID).
- FUN_RULE_DETAILS — individual rule details with operator, result type, and enabled flag, ordered by SEQ.
- FUN_RULE_CRITERIA / FUN_RULE_CRIT_PARAMS_B — rule criteria and their bound parameters used to conditionally evaluate details.
- FUN_RULE_PARAM_VALUES — parameter value storage consumed during evaluation.
- FUN_RULE_BULK_RESULT_GT — global temporary table holding bulk evaluation results.
- FND_APPLICATION / FND_DESCRIPTIVE_FLEXS — application and flexfield metadata resolution.
- DBMS_SQL / PLITBLM — dynamic SQL execution and PL/SQL table manipulation utilities.
Usage Notes
FUN_RULE_PUB is invoked from Oracle Forms-based flexfield validation and defaulting logic, from concurrent programs performing bulk rule evaluation, and from custom PL/SQL code extending Financials functionality. Seven other packages reference it, confirming its role as reusable infrastructure. Typical invocation follows the sequence INIT_PARAMETER_LIST → SET_INSTANCE_CONTEXT → ADD_PARAMETER (repeated) → APPLY_RULE or APPLY_RULE_BULK → typed GET_* accessors. Callers must initialize the parameter list before each session, since state is held in private package globals; the package is not re-entrant across concurrent evaluations within a single session. The 12.1.1 and 12.2.2 versions share the same public API surface, meaning custom integrations generally port unchanged between releases.
-
12.1.1 DBA Data 12.1.1
-
12.1.1 DBA Data 12.1.1
-
12.2.2 DBA Data 12.2.2
-
12.2.2 DBA Data 12.2.2
-
TYPE: APPS.FUN_RULE_RESULT 12.1.1
-
TYPE: APPS.FUN_RULE_RESULT 12.2.2