Search Results oke_k_access_rules_pkg2




Overview

OKE_K_ACCESS_RULES_PKG2 is an Oracle E-Business Suite PL/SQL package owned by the APPS schema and used by the Oracle Contracts (OKE) module to manage access rules associated with contract roles. Access rules define which users holding a given contract role may view or act upon contract objects and their attributes. The package provides the core logic for compiling those rules into a persisted, queryable form and for replicating an existing rule set from one role to another.

The package is classified as OTHER in the ETRM metadata, indicating that it is an internal implementation utility rather than a formally published open API. Its three documented program units — COMPILE_RULES, COPY_RULES, and COMPILE — represent the two primary maintenance operations on contract role access rules (compilation and copying) plus a concurrent-program wrapper. The package is declared AUTHID CURRENT_USER, meaning that all unqualified object references resolve through the calling user's schema and privileges rather than the definer's.

Key Procedures and Functions

  • Compile_Rules — A Boolean function that compiles the access rules for a single contract role identified by its role ID. Compilation evaluates the raw rule definitions and materializes the resulting effective permissions so that downstream access checks can be performed efficiently. It requires FND_GLOBAL.INITIALIZE to have been called in the session.
  • Copy_Rules — A Boolean function that copies access rules from a source contract role to a target contract role. It accepts a copy option that governs how existing rules on the target are treated during the copy. This is the routine most commonly associated with the "copy_rules" search term, and it is the supported means of duplicating a role's rule configuration rather than replicating rows manually.
  • Compile — A PL/SQL concurrent program entry point that compiles access rules for all contract roles or, when a role ID is supplied, for one specific role. It follows the standard concurrent program signature with ERRBUF and RETCODE out parameters and is invoked from the Concurrent Manager rather than from a form.

No additional program units beyond these three are documented in the package specification.

Tables Accessed

  • OKE_K_ACCESS_RULES and OKE_K_ACCESS_RULES_S — the base and translated/security rule definition tables that store the raw access rule configuration per contract role; these are the source data for compilation and the subject of the copy operation.
  • OKE_COMPILED_ACCESS_RULES — the materialized output of Compile_Rules and Compile, holding the resolved effective permissions used at runtime.
  • OKE_ROLE_FUNCTIONS — defines the functions associated with each contract role, forming part of the rule resolution path.
  • OKE_OBJECT_ATTRIBUTES_B — supplies contract object attribute metadata against which rules are evaluated.
  • FND_FORM_FUNCTIONS and FND_MENU_ENTRIES — the Oracle Applications function and menu definitions that access rules reference when mapping roles to application functionality.
  • PA_ROLE_CONTROLS — the project accounting role control table that constrains role-based access behavior.

Usage Notes

Compile and Compile_Rules are typically executed after access rule configuration changes have been committed, either through the Contracts setup forms or through a dedicated concurrent request submitted from the Concurrent Manager. Because the compiled results are persisted separately, administrators must recompile after adding, editing, or removing rules for the change to take effect.

Copy_Rules is invoked when a new contract role should inherit an existing role's rule set, avoiding manual re-entry of many individual rules. Custom code that calls any of these three units must first call FND_GLOBAL.INITIALIZE to establish the correct application and user context, as noted in the package header. The package is referenced by zero other packages in the documented metadata, so callers are expected to be forms, concurrent programs, or custom extensions rather than other server-side packages. Direct DML against the underlying rule tables is not advisable; the supported maintenance path is through this package and the standard Contracts setup user interface.