Search Results get_final_approver




Overview

APPS.PQH_AME_UTILS is a public PL/SQL package body in Oracle E-Business Suite Release 12.1.1 and 12.2.2 that supports Oracle Approvals Management (AME) integration for the Oracle HRMS Public Sector/Position Hiring (PQH) product family. The package encapsulates the logic required to resolve approval routing context from HR API transactions so that AME can identify the correct item type, item key, process name, and the persons associated with an approval request. Its classification in the ETRM repository is "OTHER," indicating it is a supporting utility package rather than a formal business API. The single documented g_item_type variable is central to this purpose: it caches the AME transaction item type retrieved from HR_API_TRANSACTIONS so that downstream approval logic can evaluate routing rules against the correct transaction category.

Key Procedures and Functions

The ETRM metadata documents five callable objects in this package, all of which the user will encounter when tracing g_item_type usage:

  • POPULATE_TXN_DETAILS — Loads a single HR API transaction record into package-level global variables, including g_item_type, g_item_key, g_process_name, g_person_id, and g_creator_person_id. It short-circuits if the requested transaction ID matches the currently cached transaction, avoiding redundant database access.
  • GET_ITEM_TYPE — Returns the AME item type for a given transaction. It calls POPULATE_TXN_DETAILS first and then returns the cached g_item_type value. This is the primary entry point through which callers obtain the item type required by AME rule evaluation.
  • GET_ITEM_KEY — Returns the transaction's item key, the unique identifier AME uses to correlate approval records.
  • GET_PROCESS_NAME — Returns the process name associated with the transaction, used by AME to distinguish transaction categories during rule resolution.
  • GET_FINAL_APPROVER — Resolves the final approver for the approval chain, drawing on the assignment information in PER_ALL_ASSIGNMENTS_F.
  • GET_REQUESTOR_PERSON_ID — Returns the person identifier of the requester who initiated the transaction.

The error handler on GET_ITEM_TYPE invokes wf_core.context using g_item_type and g_item_key for diagnostic logging before re-raising, confirming the package's tight coupling to AME context propagation.

Tables Accessed

Two base tables are referenced through APPS synonyms. HR_API_TRANSACTIONS is the principal source: the csr_txn cursor selects ITEM_TYPE, ITEM_KEY, PROCESS_NAME, SELECTED_PERSON_ID, and CREATOR_PERSON_ID by TRANSACTION_ID, populating the package globals and thereby g_item_type. PER_ALL_ASSIGNMENTS_F supplies assignment-level information required to determine the final approver. No insert, update, or delete operations are documented; the package is read-only.

Usage Notes

PQH_AME_UTILS is invoked indirectly rather than directly by end users. In typical EBS deployments it is called from approval workflow processes, AME rule function definitions, and PQH transaction APIs whenever approval routing details must be resolved. Because it exposes only function-based accessors, custom code should call GET_ITEM_TYPE, GET_ITEM_KEY, GET_PROCESS_NAME, or GET_FINAL_APPROVER rather than attempting to read the global variables directly. The ETRM records zero dependent packages, so its public surface is stable and its callers are external. The package header identifies a 2005 origin and it remains shipped in both 12.1.1 and 12.2.2, meaning customizations should assume no functional change between those releases.