Search Results okc_rul_pvt




Overview

OKC_RUL_PVT is a private PL/SQL package body in the APPS schema that supports the Oracle Contract Terms Library (part of Oracle Contract Management / ETRM) in Oracle E-Business Suite 12.1.1 and 12.2.2. Its name derives from "Rules Private," reflecting that it encapsulates the low-level, internal logic used to manage contract rules and rule groups defined within the Terms Library. Rules in the Contract Terms Library are reusable clause, template, and validation constructs that govern how contracts are authored and enforced.

Because the package is classified as a PVT (private) API object, it is not intended to be called directly by external integrations. Instead, it operates beneath the public application programming interfaces — principally OKC_API and OKC_RLD_PVT — providing the internal insert, update, delete, concurrency, validation, and versioning operations that those higher-level APIs depend on. The package carries a VALID status and is invoked extensively across the contract rules framework, with the metadata indicating it is referenced by 23 other database objects.

Key Procedures and Functions

The package exposes 17 documented procedures and functions. The core DML and row-management routines include:

  • INSERT_ROW — Creates a new row in the rules entity, applying the defaulting and column population logic required for rule records.
  • UPDATE_ROW — Modifies an existing rules record.
  • DELETE_ROW — Removes a rules record.
  • LOCK_ROW — Acquires a row-level lock to enforce optimistic concurrency control during edits.
  • VALIDATE_ROW — Performs the internal validation checks applied to a rules row before it is committed.
  • INSERT_ROW_UPG — Supports rule insertion in an upgrade context, populating records during data migration.

The versioning and lifecycle routines include:

  • CREATE_VERSION, CHANGE_VERSION, and RESTORE_VERSION — Manage the version history of a rule, creating new versions, switching the active version, and reverting to a prior version respectively.
  • API_COPY — Copies rule data, typically when duplicating rules across objects.
  • ADD_LANGUAGE — Inserts translated (multi-language) rows for a rule.
  • QC — Provides a quality-control or consistency-check routine associated with the rules data.

Tables Accessed

The package reads and writes through APPS synonyms. Its primary transactional tables are OKC_RULES_B (the base rules table), OKC_RULES_BH (its history table), OKC_RULES_V (the rules view), OKC_RULE_DEFS_B (rule definitions), OKC_RULE_GROUPS_B (rule groups), OKC_RG_DEF_RULES (the association between rule groups and definitions), and OKC_SUBCLASS_RG_DEFS (subclass-to-rule-group-definition links). OKC_K_HEADERS_B supplies contract header context. Temporary working tables, OKC_DDF_CONTEXTCODE_TMP and OKC_OBJ_DDF_CTXCODE_TMP, support DFF context-code processing during rule operations.

Descriptive flexfield support is delivered through FND_FLEX_VALIDATION_TABLES, FND_FLEX_VALUES, and FND_FLEX_VALUE_SETS. JTF_OBJECTS_B and JTF_OBJECTS_VL provide object registration metadata, and PLITBLM is the standard Oracle index-by table used internally.

Usage Notes

OKC_RUL_PVT is a private package and should not be called directly from custom code; Oracle does not guarantee its interface across releases or patches. It is normally invoked indirectly through the public OKC_API and OKC_RLD_PVT entry points, which in turn are driven from the Contract Terms Library setup and authoring forms, and from concurrent programs that process rules, rule groups, and their versions. The presence of the versioning routines (CREATE_VERSION, CHANGE_VERSION, RESTORE_VERSION) indicates it participates in contract rule version management. The INSERT_ROW_UPG routine signals a role in upgrade and data-migration scripts. Custom developers requiring rule manipulation should use the supported public APIs rather than referencing this private body.