Search Results max_cardinality




Overview

OKC_RG_DEF_RULES is a Contracts Core (OKC) configuration table in Oracle EBS 12.1.1 and 12.2.2 that defines the association between rule group definitions and individual rule definitions. In practical terms, it answers the question: "Which rules belong to which rule group, and is each rule optional within that group?" Rule groups are the containers that drive contract validation, defaulting, pricing, and clause generation behavior in Oracle Contracts; this table is the junction that binds rules to those containers.

From a Data Vault modeling perspective, the mined heuristic classification is hub-leaning. The table has a two-column primary key (RGD_CODE, RDF_CODE) that resembles a link between two business concepts, but because it also carries descriptive attributes such as optionality, cardinality bounds, and pricing flags, it is best treated as a hybrid hub/link construct. Modelers should treat it as a suggestion only; the authoritative source is the OKC schema definition.

Key Information Stored

The table contains 16 documented columns. The most significant are:

  • RGD_CODE — Rule group definition code. Part of the composite primary key and the leading column in every join to rule sources and optionality rules.
  • RDF_CODE — Rule definition code. The second half of the composite primary key; identifies the specific rule attached to the group.
  • OPTIONAL_YN — Flag indicating whether the rule is optional within the group. Drives whether the rule engine enforces or merely offers the rule at contract creation time.
  • MIN_CARDINALITY / MAX_CARDINALITY — Bounds on how many times or instances the rule may apply within the group.
  • PRICING_RELATED_YN — Indicates whether the rule participates in pricing calculations, allowing pricing rules to be filtered separately from general validation rules.
  • ACCESS_LEVEL — Controls visibility/access scope for the rule association.
  • APPLICATION_ID — Identifies the owning application, typically Contracts (OKC).
  • SECURITY_GROUP_ID — Foreign key to FND_SECURITY_GROUPS, supporting multi-tenant or organizational data segregation.
  • OBJECT_VERSION_NUMBER — Optimistic locking column used by the OAF/ADF framework.
  • CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN — Standard WHO columns for audit traceability.
  • ZD_EDITION_NAME — Editioning column supporting Online Patching (adopted in 12.2.x).

The primary key is OKC_RG_DEF_RULES_PK over (RGD_CODE, RDF_CODE). The unique index OKC_RG_DEF_RULES_U1 over (RGD_CODE, RDF_CODE, ZD_EDITION_NAME) is the business-key candidate under editioning. Because access is governed through SECURITY_GROUP_ID, Row Level Security (RLS/AGL) can be applied to isolate rule definitions by operating unit or legal entity.

Common Use Cases and Queries

Typical uses include auditing which rules belong to a group, identifying mandatory versus optional rules, and reporting on pricing-related rule coverage.

-- List all rules in a group with optionality and cardinality
SELECT r.RGD_CODE, r.RDF_CODE, r.OPTIONAL_YN,
       r.MIN_CARDINALITY, r.MAX_CARDINALITY, r.PRICING_RELATED_YN
FROM   OKC.OKC_RG_DEF_RULES r
WHERE  r.RGD_CODE = :p_group_code;

-- Find all groups that reference a specific rule
SELECT RGD_CODE FROM OKC.OKC_RG_DEF_RULES WHERE RDF_CODE = :p_rule_code;

-- Pricing-only associations
SELECT RGD_CODE, RDF_CODE FROM OKC.OKC_RG_DEF_RULES
WHERE  PRICING_RELATED_YN = 'Y';

Reporting scenarios include gap analysis (rules defined but not attached to any group), impact analysis before changing a rule's behavior, and reconciling rule groups across environments after a clone. Because the table is configuration metadata, changes should be made through the Contracts setup UI or supported APIs rather than direct DML; direct updates bypass object version checks and can desynchronize the rule engine cache.

Related Objects

  • OKC_RULE_DEF_SOURCES — References OKC_RG_DEF_RULES via (RGR_RGD_CODE, RGR_RDF_CODE). Links rule associations to their source definitions.
  • OKL_OPT_RULES — References OKC_RG_DEF_RULES via (RGR_RGD_CODE, RGR_RDF_CODE). Used by Oracle Lease Management optionality rules.
  • FND_SECURITY_GROUPS — Referenced through SECURITY_GROUP_ID for data segregation.
  • OKC_RULE_DEFINITIONS / OKC_RG_DEFINITIONS — Master rule and rule-group definition tables that RDF_CODE and RGD_CODE denormalize into.

Join path pattern: OKC_RG_DEF_RULES.RGD_CODE = OKC_RULE_DEF_SOURCES.RGR_RGD_CODE AND OKC_RG_DEF_RULES.RDF_CODE = OKC_RULE_DEF_SOURCES.RGR_RDF_CODE. This is the canonical composite-key join used in Contracts rule diagnostics and in lease optionality extraction queries.