Search Results key_to_ids_3
Overview
The APPS.AME_CONDITION_USAGES_API package body is a public application programming interface belonging to the Oracle Approvals Management (AME) module within Oracle E-Business Suite 12.1.1 and 12.2.2. AME provides a declarative rules engine that determines approval routing for transactions originating in other Oracle applications, such as purchasing, human resources, and general ledger. The condition usage entity constitutes the associative link that defines which approval conditions are attached to which approval rules. The AME_CONDITION_USAGES_API package encapsulates the data manipulation logic required to maintain rows in the AME_CONDITION_USAGES table, shielding callers from the underlying WHO-column derivation and key-resolution mechanics. It is classified as an API in the ETRM registry, indicating that it is intended for programmatic invocation rather than direct end-user interaction, and that its signature and behavior are supported across releases. The package body includes private helper procedures such as OWNER_TO_WHO and overloaded KEY_TO_IDS variants that translate a rule key and condition identifier into the surrogate primary keys and usage counts employed by the base table.
Key Procedures and Functions
- INSERT_ROW — Inserts a new condition usage record, associating a condition with a rule. The procedure derives the created-by, last-updated-by, and last-update-login audit columns from a supplied owner value.
- DELETE_ROW — Removes an existing condition usage record, identified by its composite rule and condition keys, from the base table.
- LOAD_ROW — Performs a conditioned insert-or-update (upsert) operation, loading a condition usage row and reconciling it against any existing definition for the same key combination.
The package body further contains the procedures OWNER_TO_WHO, KEY_TO_IDS, and KEY_TO_IDS_3. These are internal helpers: OWNER_TO_WHO converts an owner string into integer WHO columns via AME_SEED_UTILITY.OWNER_AS_INTEGER, while the KEY_TO_IDS overloads resolve numeric rule and condition identifiers from their business keys and compute the condition usage count from AME_CONDITION_USAGES.
Tables Accessed
- AME_CONDITION_USAGES — The primary base table. It stores the association between a condition and a rule and is the target of the
INSERT_ROW,DELETE_ROW, andLOAD_ROWoperations. TheKEY_TO_IDShelpers also reference it inSELECT COUNT(*)queries filtered byCONDITION_IDandRULE_ID. - AME_RULES — Read by the
KEY_TO_IDS_3helper to resolve the surrogateRULE_IDfrom the externalRULE_KEYvalue.
Usage Notes
This package is typically invoked during the creation and maintenance of AME business rules, either from the AME setup user interface, from concurrent programs that seed or migrate rule definitions, or from custom PL/SQL that programmatically configures approval routing. Because the ETRM registry records no other packages referencing this API, callers should invoke it directly against the APPS schema and observe the standard WHO audit conventions. When upgrading between 12.1.1 and 12.2.2, the API remains stable, though the surrounding AME rule configuration model may present additional attributes.