Search Results okc_rg_def_rules_pk




Overview

The OKC_RG_DEF_RULES table is a core intersection table within the Oracle E-Business Suite Contracts Core (OKC) module, specifically for versions 12.1.1 and 12.2.2. It serves as the foundational data structure that governs the association between rule definitions and rule group definitions. In the context of the complex contract management system, this table defines which specific business rules are included within a particular rule group and establishes the optionality of that inclusion. This relationship is critical for enforcing contract terms, validations, and business logic in a structured and reusable manner. The table's existence enables the modular construction of rule sets, allowing administrators to define standard groups of rules that can be consistently applied across multiple contract types and documents.

Key Information Stored

The table primarily stores the composite key that uniquely identifies each rule-to-group association. The two critical columns are RGD_CODE and RDF_CODE, which together form the primary key (OKC_RG_DEF_RULES_PK). The RGD_CODE column holds the identifier for the Rule Group Definition, while the RDF_CODE column holds the identifier for the Rule Definition. While the provided metadata focuses on the key structure, the table's description indicates it also stores "the optionality of that association." This implies the presence of at least one additional attribute column (not explicitly named in the excerpt) that defines whether the associated rule is mandatory or optional within the context of its parent rule group. This optionality flag is essential for determining contract compliance and enforcement behavior.

Common Use Cases and Queries

A primary use case is the analysis and reporting of which business rules are configured within specific rule groups. This is vital for audits, troubleshooting contract behavior, and during implementation upgrades. Developers and functional consultants frequently query this table to understand the rule hierarchy. A common SQL pattern retrieves all rules for a given rule group definition code:

  • SELECT rdf_code FROM okc_rg_def_rules WHERE rgd_code = '&RGD_CODE';

Conversely, to find all rule groups containing a specific rule, the inverse query is used:

  • SELECT rgd_code FROM okc_rg_def_rules WHERE rdf_code = '&RDF_CODE';

Another critical scenario involves validating data integrity or identifying orphaned records before data migrations by performing outer joins with the parent definition tables for rule groups (OKC_RULE_GROUP_DEFS) and rules (OKC_RULE_DEFS_B).

Related Objects

The OKC_RG_DEF_RULES table sits at the center of a key data model, with documented foreign key relationships to downstream objects. As per the provided metadata, the following tables reference OKC_RG_DEF_RULES, using its primary key columns to enforce referential integrity:

  • OKC_RULE_DEF_SOURCES: References this table via the columns RGR_RGD_CODE and RGR_RDF_CODE. This links rule definitions within a group to their specific sources or origins.
  • OKL_OPT_RULES: References this table via the columns RGR_RGD_CODE and RGR_RDF_CODE. This relationship extends the rule group framework into the Oracle Lease and Finance Management (OKL) module, highlighting the integration point where contract rules are utilized for lease option processing.

The table itself is a child of the core definition tables OKC_RULE_GROUP_DEFS (via RGD_CODE) and OKC_RULE_DEFS_B (via RDF_CODE), which are not listed as foreign keys in the provided excerpt but are implied by the column descriptions and standard OKC data model.

  • Table: OKC_RG_DEF_RULES 12.1.1

    owner:OKC,  object_type:TABLE,  fnd_design_data:OKC.OKC_RG_DEF_RULES,  object_name:OKC_RG_DEF_RULES,  status:VALID,  product: OKC - Contracts Coredescription: Defines what rule definitions are associated with what rule group definitions and the optionality of that association. ,  implementation_dba_data: OKC.OKC_RG_DEF_RULES

  • Table: OKC_RG_DEF_RULES 12.2.2

    owner:OKC,  object_type:TABLE,  fnd_design_data:OKC.OKC_RG_DEF_RULES,  object_name:OKC_RG_DEF_RULES,  status:VALID,  product: OKC - Contracts Coredescription: Defines what rule definitions are associated with what rule group definitions and the optionality of that association. ,  implementation_dba_data: OKC.OKC_RG_DEF_RULES