Search Results get_strategy_from_cache




Overview

APPS.WMS_CACHE is an internal caching package in the Oracle E-Business Suite Warehouse Management System (WMS) module. It provides a lightweight server-side memory cache for data that is read repeatedly during warehouse execution transactions, most notably unit-of-measure (UOM) conversion rates and warehouse execution strategy definitions. By storing frequently requested conversions and strategy records in PL/SQL associative array (PLITBLM) structures for the duration of a database session, the package eliminates redundant queries and repeated calls to the INV_CONVERT conversion engine. This reduces context switching and round trips to the base tables, improving throughput on high-volume tasks such as receiving, put-away, picking, and material movement. The package body header (WMSCACHB.pls, version 120.2.12020000.2, dated 2012/07/04) reflects maintenance spanning multiple release levels, and the code carries bug-fix markers for issues such as Bug 9056696 (lot and organization context in UOM conversion) and Bug 8934647 (error return handling). The package is classified as an OTHER API in the ETRM metadata, indicating it is primarily a supporting/internal component rather than a published business API.

Key Procedures and Functions

  • UOM_CONVERT — Returns a numeric unit-of-measure conversion factor between a source and destination UOM for a given item. If a lot number is supplied, the function delegates directly to INV_CONVERT.INV_UM_CONVERSION with lot and organization context (added for Bug 9056696). Otherwise, it builds a hash key from the from-unit, to-unit, and item identifier using DBMS_UTILITY.GET_HASH_VALUE and probes the package-level cache arrays. On a cache miss the conversion rate is computed via INV_CONVERT.INV_UM_CONVERSION and then stored in both forward and inverse directions. The function respects the caller-supplied precision and propagates the special error return value of -99999 when the underlying conversion fails.
  • GET_STRATEGY_FROM_CACHE — Retrieves a warehouse execution strategy definition from the in-memory cache, loading it from the base strategy tables when it is not already present. This allows strategy lookups performed during warehouse transaction processing to avoid repeated table access.
  • CLEANUP_RULES_CACHE — Purges cached rule and strategy data from the package-level structures. Invoking this procedure forces subsequent strategy or rule requests to be re-read from the database, ensuring freshness after strategy maintenance or rule changes. This is the routine most commonly sought by administrators and developers searching the term "cleanup_rules_cache," because it is the supported mechanism for invalidating the WMS strategy cache during a session.

Tables Accessed

The package references the following objects through APPS synonyms: WMS_STRATEGIES_B, which holds the base strategy header records; WMS_RULES_B, which stores rule definitions used to build execution strategies; WMS_STRATEGY_MEMBERS, which maps the rules and components participating in each strategy; DBMS_UTILITY, used for hash key generation in the UOM cache; and PLITBLM, the PL/SQL table type definitions supporting the associative arrays that implement the cache itself. The strategy-related tables are read when populating the cache and are not modified by this package.

Usage Notes

WMS_CACHE is invoked indirectly rather than through direct end-user navigation. WMS forms, warehouse execution concurrent programs, and mobile/radio-frequency transactions call it whenever a UOM conversion or a strategy lookup is required, and the cached values persist for the life of the database session. Custom code that maintains strategy or rule data should call CLEANUP_RULES_CACHE after committing changes so that stale entries are not reused by long-running sessions. Because the cache is session-scoped and non-persistent, no concurrent program is needed to refresh it, but developers must remember that changes made in one session are not automatically visible to the in-memory cache of another. The package is referenced by two other database packages within the WMS schema, confirming its role as a shared internal utility rather than a standalone API.