Search Results okc_rule_defs_v




Overview

OKC_RULE_DEFS_V is a seeded, read-only view owned by the APPS schema in Oracle E-Business Suite, delivered as part of the OKC – Contracts Core product. The view is documented as VALID and functions as the user-facing presentation layer for contract rule definitions. Its stated purpose is to display rule definitions configured in the Contracts application. Rule definitions in OKC drive the contract terms, clauses, and validation logic that the Contracts Core engine applies when authoring, revising, or approving contract documents.

Because the view resolves language-specific translated text and application names rather than exposing raw identifiers, it is the preferred object for reporting, extracts, and integration queries that require human-readable rule metadata. Reporting tools, custom concurrent programs, and inbound/outbound interfaces targeting Oracle Contracts typically query this view rather than the underlying base and translation tables directly.

Underlying Base Objects

The view is defined over three referenced objects, as documented in the ETRM metadata:

  • OKC_RULE_DEFS_B – the base table holding the core rule definition rows, including the rule code, application context, descriptive flexfield name, object version number, and standard WHO audit columns.
  • OKC_RULE_DEFS_TL – the translation table supplying language-specific MEANING and DESCRIPTION, plus the SFWT_FLAG.
  • FND_APPLICATION_VL – the Applications view supplying APPLICATION_NAME for the owning application.

The base and translation objects are exposed through private synonyms in the OKC schema. Joins are established on B.RULE_CODE = TL.RULE_CODE, filtered by TL.LANGUAGE = USERENV('LANG') to return only the session-language translation, and on FA.APPLICATION_ID = B.APPLICATION_ID to resolve the application name. Because the USERENV('LANG') filter is applied at runtime, the view returns translated content according to the querying session's language setting.

Key Columns

  • ROW_ID – the ROWID of the base table row, retained for row-level addressing.
  • APPLICATION_ID / APPLICATION_NAME – the numeric and descriptive identity of the application owning the rule definition.
  • RULE_CODE – the primary business key identifying each rule definition and the join key to the translation table.
  • DESCRIPTIVE_FLEXFIELD_NAME – the descriptive flexfield associated with the rule, indicating the context in which rule attributes are captured.
  • MEANING / DESCRIPTION – the translated user-facing name and detail text for the rule, sourced from OKC_RULE_DEFS_TL.
  • SFWT_FLAG – a translation-related flag carried through from the TL table.
  • OBJECT_VERSION_NUMBER – the optimistic locking version, useful for detecting changed definitions.
  • CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN – standard WHO audit columns recording creation and modification history.

Common Use Cases and Queries

Typical uses include validating which rules exist for a given application, extracting rule metadata for documentation or migration, and auditing recent changes to rule definitions via the WHO columns. A representative query listing rules with their owning application follows:

SELECT rule_code, meaning, description, application_name FROM okc_rule_defs_v WHERE application_id = :p_app_id ORDER BY meaning;

To inspect definitions modified after a given date, filtering on LAST_UPDATE_DATE supports audit and interface reconciliation reports. Because translations are filtered by USERENV('LANG'), the same query returns language-appropriate text for each user session without additional joins. Rule codes returned here can be correlated with contract terms and clause setups elsewhere in OKC to trace how configured rules influence contract generation and validation.