Results for “okc_rule_groups_hv”

36 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

The OKC_RULE_GROUPS_HV view is a history view in the Oracle E-Business Suite Contracts Core (OKC) module, delivered under the APPS schema with a status of VALID. It provides a versioned, language-aware representation of rule group records maintained by the contracts engine. Rule groups (RGP) form the structural backbone of the OKC rules framework: they associate rule definitions, rule bindings, and their related conditions into logical units that the contract terms and conditions engine evaluates during contract authoring, validation, and lifecycle processing.

Because the Contracts module retains historical versions of rule group configurations, the "_HV" suffix (history view) signals that this view exposes superseded as well as current major versions rather than a single effective row per rule group. The view is intended for reporting, audit, and integration purposes, allowing implementers to trace how rule group configuration evolved. It is defined across the _BH (base history) and _TLH (translation history) tables, which is characteristic of Oracle's multi-lingual and versioned object architecture in 12.1.1 and 12.2.2.

Underlying Base Objects

The view is defined over two documented base objects, both referenced as synonyms:

  • OKC_RULE_GROUPS_BH — the base history table holding the transactional and version-specific attributes of each rule group, keyed by ID and MAJOR_VERSION.
  • OKC_RULE_GROUPS_TLH — the translation history table holding language-dependent descriptive attributes such as comments.

The join condition links the two on ID and MAJOR_VERSION, and restricts the translation side to the session language via RGPT.LANGUAGE = USERENV('LANG'). This ensures each returned row reflects the current user's language for the descriptive portion while preserving the full historical version lineage from the base history table. The view exposes ROW_ID derived from the base history rowid.

Key Columns

  • ROW_ID — row identifier derived from the base history rowid.
  • ID / MAJOR_VERSION — the rule group identifier and its major version, forming the version tracking key.
  • OBJECT_VERSION_NUMBER — optimistic locking version used by the application.
  • RGP_TYPE / RGD_CODE — rule group type and the rule group definition code.
  • SFWT_FLAG — flag sourced from the translation table, used in rule group processing logic.
  • CLE_ID, CHR_ID, DNZ_CHR_ID — contract-related identifiers (contract line, contract header, and related contract reference) that scope the rule group.
  • PARENT_RGP_ID / SAT_CODE — parent rule group reference and saturation/setup code supporting rule group hierarchy and behavior.
  • COMMENTS — descriptive text from the translation table.
  • ATTRIBUTE_CATEGORY and ATTRIBUTE1–15 — the standard Oracle DFF (descriptive flexfield) columns.
  • CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN — standard audit columns.

Common Use Cases and Queries

Typical uses include auditing rule group changes, reporting on configuration history for a given contract, and validating that the correct rule group version was in force during a contract lifecycle event. The following query lists the version history for a specific rule group:

  • SELECT id, major_version, rgp_type, rgd_code, sat_code, last_update_date FROM okc_rule_groups_hv WHERE id = :p_id ORDER BY major_version;
  • SELECT h.id, h.major_version, h.chr_id, h.comments FROM okc_rule_groups_hv h WHERE h.chr_id = :p_chr_id ORDER BY h.major_version;
  • SELECT rgp_type, COUNT(*) FROM okc_rule_groups_hv GROUP BY rgp_type;

Because the translation join is filtered to the session language, integrations should set the correct NLS language context before querying, and should always qualify by ID and MAJOR_VERSION when reconstructing point-in-time rule group state.