Search Results get_acn_type




Overview

OKC_QUEUE_RULE_PVT is a private (PVT-classified) PL/SQL package body owned by the APPS_NE schema within Oracle E-Business Suite. Its documented purpose is to resolve rule-based subscription behavior for the OKC (Contracts Core) module, specifically to determine the action type associated with a given correlation identifier. In the ETRM contract lifecycle, subscription rules govern which parties or systems are notified and how actions are dispatched when contract events occur. This package provides the low-level resolution logic that maps a correlation ID to an action type, enabling the subscription engine to determine the appropriate processing path.

Key Procedures and Functions

The package exposes a single documented function, GET_ACN_TYPE. As reflected in the source excerpt, this function accepts a correlation identifier and returns a VARCHAR2 action type value. Its internal logic performs a multi-step resolution: it first identifies the current read-only owner from FND_ORACLE_USERID, then dynamically resolves the Oracle username of the OKC application owner by joining product installation and application metadata, and finally queries the OKC_ACTIONS_B table for the acn_type matching the supplied correlation. If the resolved value is null, or if any exception occurs, the function returns the string 'Not Available' as a safe fallback. This defensive design ensures that downstream subscription processing does not fail due to missing or ambiguous rule data. The source header indicates the object was last revised at version 120.4 (2012/03/07), with a modification noted for Bug 12679276 relating to dynamic SQL owner resolution.

Tables Accessed

The package references FND_ORACLE_USERID (via an APPS synonym) to determine the read-only Oracle schema owner used to build dynamic SQL statements. Additional dynamic queries target FND_PRODUCT_INSTALLATIONS, FND_ORACLE_USERID, and FND_APPLICATION to resolve the OKC application owner, and OKC_ACTIONS_B to retrieve the action type. The use of EXECUTE IMMEDIATE with dynamically constructed owner prefixes reflects the multi-org, multi-schema architecture of EBS, where private packages must resolve the correct application-owner schema at runtime rather than relying on static synonyms.

Usage Notes

As a PVT-classified package, OKC_QUEUE_RULE_PVT is not intended for direct invocation by external custom code or end users; it is invoked internally by other OKC subscription and contract-processing routines. The ETRM metadata records that the package is referenced by three other packages, indicating it forms part of an internal private API layer supporting rule-based subscription resolution. In typical Oracle EBS 12.1.1 and 12.2.2 deployments, such resolution logic is triggered during contract creation, amendment, or event notification workflows within the OKC Contracts module, often originating from forms or concurrent programs. The pervasive exception handler returning 'Not Available' means callers should treat that value as a benign "no rule found" signal rather than a hard error. Customizations should never call this package directly; instead, they should use supported public APIs, as the dynamic owner-resolution logic is sensitive to schema configuration and application installation state.