Search Results insert_rule_line




Overview

FND_FLEX_TRIGGER is an internal Oracle E-Business Suite PL/SQL package owned by the APPS schema. It provides low-level support routines for Oracle Flexfields, specifically the Key Flexfield (KFF) and Descriptive Flexfield (DFF) validation rule infrastructure. Its primary responsibility is to maintain the condition and result lines that define cross-validation and validation rules, and to refresh the statistics used by the Flexfield validation engine when those rules change.

Rather than serving as a public application programming interface, FND_FLEX_TRIGGER functions as a utility layer beneath the Flexfields setup forms. It is one of the components the Flexfield validation rule framework calls when rule data is inserted, updated, or deleted. Its classification in the ETRM documentation as "OTHER" reflects this internal utility role rather than a formal open API. Notably, it is referenced by the FND_FLEX_VALIDATION_RULES_T1 through T3 database triggers and the FND_FLEX_VAL_RULE_LINES_T2 through T4 triggers, indicating that it executes automatically as a consequence of DML against the underlying validation rule tables.

Key Procedures and Functions

The ETRM metadata documents four procedures or functions within this package. No parameter lists are published, so only their purposes are described below.

  • UPDATE_CVR_STATS — Refreshes statistical data associated with cross-validation rules. Statistics maintained in FND_FLEX_VALIDATION_RULE_STATS are used by the Flexfield validation runtime to determine whether and how a rule can be applied, so this routine keeps that information current after rule definitions change.
  • INSERT_RULE_LINE — Handles the insertion of a rule line, populating the appropriate include or exclude rule line table with the condition or result detail for a validation rule.
  • UPDATE_RULE_LINE — Modifies an existing rule line, allowing the definition of a rule condition or result to be changed without deleting and recreating it.
  • DELETE_RULE_LINE — Removes a rule line from the validation rule definition, supporting both direct maintenance and cascading cleanup when a rule is removed.

Collectively these routines provide the maintenance operations for the include and exclude rule line records that constitute the body of a Flexfield validation rule.

Tables Accessed

The package operates on the following tables, which the ETRM metadata identifies through APPS synonyms:

  • FND_FLEX_INCLUDE_RULE_LINES and FND_FLEX_EXCLUDE_RULE_LINES — Store the include and exclude condition lines that make up validation rule definitions. This is the primary data the package maintains.
  • FND_FLEX_VALIDATION_RULE_STATS — Holds statistics for validation rules; maintained by UPDATE_CVR_STATS.
  • FND_ID_FLEX_SEGMENTS and FND_ID_FLEX_STRUCTURES — Define Key Flexfield structures and their segments. The package reads these to associate rule lines with the correct flexfield structure and segment context.
  • DUAL — Used for standard single-row SQL constructs.

Usage Notes

FND_FLEX_TRIGGER is invoked indirectly rather than by end users or custom code. The FND_FLEX_VALIDATION_RULES_T1, T2, and T3 triggers and the FND_FLEX_VAL_RULE_LINES_T2, T3, and T4 triggers reference it, so rule line maintenance performed through the Flexfields setup forms (or any supported DML against those tables) causes the package routines to execute and keep the rule line and statistics tables consistent.

Because it is referenced by seven other packages and is dependency-linked to SYS.STANDARD, the package forms part of the runtime foundation of Flexfield validation. Custom development should not call these procedures directly; instead, use the supported Flexfield setup forms or the documented validation APIs. Direct modification of the underlying rule line tables can leave the statistics stale, and the package exists precisely to prevent that. This behavior is consistent across Oracle EBS 12.1.1 and 12.2.2.