Search Results rule_outcome_id




Overview

The view APPS.OKC_XPRT_RULE_OUTCOMES_ACT_V is a reporting and integration object within the Oracle E-Business Suite Contracts (OKC) module, specifically part of the Contract Expert (XPRT) rule engine infrastructure. Contract Expert evaluates user-defined rules against contract terms and conditions during contract authoring, and each rule may produce one or more outcomes — the actions or values generated when a rule's conditions are satisfied. This view consolidates rule outcome data across two distinct storage locations so that consumers see a single, unified set of outcomes belonging to currently active rules.

Its principal role is to hide the internal bifurcation of outcome storage. Rather than requiring callers to know whether a given outcome resides in the standard OKC_XPRT_RULE_OUTCOMES table or in the denormalized OKC_XPRT_RULE_OUTCOMES_ACTIVE structure, the view presents both sources through a common projection. This makes it suitable for PL/SQL packages, concurrent programs, OAF pages, and external integrations that need to enumerate or query active rule outcomes without embedding that storage logic themselves.

Underlying Base Objects

The view is defined over three documented base objects, all exposed in the APPS schema as synonyms:

  • OKC_XPRT_RULE_HDRS_ALL — the rule header (master) table, supplying RULE_ID and STATUS_CODE. Only headers whose STATUS_CODE equals 'ACTIVE' qualify.
  • OKC_XPRT_RULE_OUTCOMES — the primary outcome table, whose rows are included only when their RULE_ID belongs to an active rule header.
  • OKC_XPRT_RULE_OUTCOMES_ACTIVE — an additional outcome store, unioned in full.

Structurally the view is the UNION ALL of two identical 12-column SELECT lists. The first branch filters OKC_XPRT_RULE_OUTCOMES through an IN subquery on OKC_XPRT_RULE_HDRS_ALL; the second selects the same columns from OKC_XPRT_RULE_OUTCOMES_ACTIVE without a header filter. Because the operator is UNION ALL, duplicate RULE_OUTCOME_ID values are not eliminated — a caveat for any consumer assuming uniqueness.

Key Columns

The view projects the following columns:

  • RULE_OUTCOME_ID — primary identifier of the outcome row. Given the UNION ALL, treat this as potentially non-unique across the combined result set.
  • RULE_ID — foreign key linking the outcome to its parent rule in OKC_XPRT_RULE_HDRS_ALL; the central join key for rule-to-outcome navigation and the column most directly relevant to rule-level lookups.
  • OBJECT_TYPE / OBJECT_VALUE_ID — identify the target object of the outcome and the specific instance value it applies to.
  • OBJECT_VERSION_NUMBER — optimistic locking / versioning column used by the framework when updating the underlying row.
  • MANDATORY_YN — indicates whether the outcome is mandatory when the rule fires.
  • MANDATORY_RWA — the "Real World Action" flag associated with mandatory enforcement.
  • CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN — standard EBS WHO columns recording audit and concurrency information.

Common Use Cases and Queries

Typical usage centers on retrieving outcomes for a known rule or listing all outcomes of active rules. A direct lookup by the search term rule_id might appear as:

  • SELECT rule_outcome_id, rule_id, object_type, object_value_id, mandatory_yn FROM okc_xprt_rule_outcomes_act_v WHERE rule_id = :p_rule_id;
  • SELECT rule_id, COUNT(*) FROM okc_xprt_rule_outcomes_act_v GROUP BY rule_id; — to profile outcome counts per active rule.
  • Joining the view to OKC_XPRT_RULE_HDRS_ALL on RULE_ID to enrich outcomes with rule names and metadata for reporting.

Because the view already restricts OKC_XPRT_RULE_OUTCOMES to active headers, additional STATUS_CODE filtering is generally unnecessary. Analysts should nonetheless account for the unfiltered union of OKC_XPRT_RULE_OUTCOMES_ACTIVE and use DISTINCT or aggregate logic where outcome uniqueness is required.