Results for “okc_rules”

22 results




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

Overview

OKC_RULES_HV is an APPS-owned database view in Oracle E-Business Suite that serves as the history view for the OKC_RULES entity within the Contracts Core (OKC) product. Its principal role is to expose versioned and historical rule records for Oracle Contracts, Contract Terms, and related rule-driven transaction logic. The view is catalogued in ETRM with a VALID status and is available in both the 12.1.1 and 12.2.2 releases.

In Oracle EBS reporting and integration design, "_HV" views represent a standardized history-access pattern. Rather than querying the "_BH" (base history) table directly, developers and integrators use the history view because it presents the same data through a stable, application-supported interface with consistent column naming. OKC_RULES_HV therefore acts as the supported read interface for contract rule history.

Underlying Base Objects

According to the documented view metadata, OKC_RULES_HV is defined over the synonym OKC_RULES_BH. The "_BH" suffix denotes the base history table that physically stores all versioned rows for contract rules. The view's SELECT list references this object through the alias RULB, selecting from RULB.ROWID, RULB.ID, RULB.MAJOR_VERSION, RULB.OBJECT_VERSION_NUMBER, and the remainder of the rule attributes.

Because the view is defined over the history table rather than the operational table, it returns the complete version chain for each rule record. The ROWID is exposed as ROW_ID, allowing row-level addressing of the physical history record, while ID identifies the logical rule. The inclusion of MAJOR_VERSION and OBJECT_VERSION_NUMBER supports the Oracle EBS versioning model used throughout the Contracts schema. A literal 'N' is projected as SFWT_FLAG, and a NULL is projected as TEXT, both of which are structural conventions present in this view family.

Key Columns

  • ROW_ID / ID — Physical row identifier and logical rule identifier.
  • MAJOR_VERSION / OBJECT_VERSION_NUMBER — Version indicators used to sequence historical rows and support optimistic locking semantics.
  • OBJECT1_ID1 through OBJECT3_ID2 and JTOT_OBJECT1_CODE through JTOT_OBJECT3_CODE — The object reference framework that links a rule to the business objects it governs, along with their join-object type codes.
  • DNZ_CHR_ID — Identifier of the contract document to which the rule applies.
  • RGP_ID — Reference to the rule group that owns the rule.
  • PRIORITY, WARN_YN, STD_TEMPLATE_YN — Control attributes defining rule evaluation order, whether violations raise a warning, and whether the rule originates from a standard template.
  • RULE_INFORMATION1 through RULE_INFORMATION13 — Descriptive flexfield segments carrying rule-specific information.
  • ATTRIBUTE_CATEGORY and ATTRIBUTE1 through ATTRIBUTE15 — The standard EBS DFF/attribute columns.
  • CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN — Standard auditing columns reflecting who created and last modified each version.

Common Use Cases and Queries

Typical use cases include auditing the evolution of contract rules, reconstructing the state of a rule as of a point in time, and diagnosing rule-evaluation behavior in contract authoring and fulfillment flows. The following query lists all historical versions of the rules belonging to a given contract document:

  • SELECT id, major_version, object_version_number, rgp_id, priority, warn_yn, creation_date, last_update_date FROM okc_rules_hv WHERE dnz_chr_id = :p_chr_id ORDER BY id, major_version;
  • SELECT rh.id, rh.major_version, rh.last_updated_by, rh.last_update_date FROM okc_rules_hv rh WHERE rh.id = :p_rule_id ORDER BY rh.major_version DESC;
  • SELECT rgp_id, COUNT(*) FROM okc_rules_hv WHERE std_template_yn = 'Y' GROUP BY rgp_id;

Because the view projects ROWID as ROW_ID, it can also be joined to other history views in the OKC schema when correlating rule versions with contract version history. When querying from SQL*Plus or an external integration, the APPS schema or a synonym must be used, and the view should be treated as read-only.