Search Results op_plan_instances
Overview
WMS_ATF_RUNTIME_PUB_APIS is a public PL/SQL package body in the Oracle Warehouse Management (WMS) module that exposes the runtime APIs for Operation Plans. Operation Plans orchestrate the execution of warehouse work within a facility: loading, dropping, sorting, consolidating, packing, load-ship, and ship operations. The package provides the programmatic interface that calling applications, concurrent programs, and integration code use to create, activate, progress, and terminate operation plan instances at run time.
The package header identifies it as the "WMS Operation Plan Run-time APIs" and was originally created on 24-Jul-2003, with the shipped version carrying the header tag 120.22.12020000.2 dated 2012/09/22. It is owned by APPS and classified in the ETRM repository as an OTHER API. Because the package operates on operation plan instances — the run-time realization of an operation plan — the search term op_plan_instances maps directly to its core purpose. The package is referenced by 11 other packages and in turn references several WMS and MTL base tables.
Package-level constants map to WMS globals, including operation types (G_OP_TYPE_LOAD, G_OP_TYPE_DROP, G_OP_TYPE_SORT, G_OP_TYPE_CONSOLIDATE, G_OP_TYPE_PACK, G_OP_TYPE_LOAD_SHIP, G_OP_TYPE_SHIP), operation destination modes (system suggested, API, pre-specified, rules engine), WMS task types (pick, stage move, putaway, inspect), and drop-LPN options. These constants allow callers to pass consistent, symbolic values when invoking the runtime APIs.
Key Procedures and Functions
The ETRM metadata documents 11 procedures and functions in the package:
- INIT_OP_PLAN_INSTANCE — Initializes a new operation plan instance at run time, establishing the plan context before operations are executed.
- ACTIVATE_OPERATION_INSTANCE — Activates an operation instance so that its associated tasks and movements are released into the warehouse execution flow.
- COMPLETE_OPERATION_INSTANCE — Marks an operation instance as complete once all work under it has finished.
- VALIDATE_OPERATION — Validates an operation against the plan instance rules and constraints before execution proceeds.
- SPLIT_OPERATION_INSTANCE — Splits an operation instance into multiple instances, typically to divide work across resources or containers.
- CLEANUP_OPERATION_INSTANCE — Performs housekeeping and removes transient data for a completed or aborted operation instance.
- CANCEL_OPERATION_PLAN — Cancels an operation plan, terminating pending work associated with the plan.
- ABORT_OPERATION_PLAN — Aborts an operation plan in progress, stopping execution without a normal completion.
- ROLLBACK_OPERATION_PLAN — Rolls back the effects of an operation plan, restoring prior state to the extent supported.
- CHECK_PLAN_STATUS — Returns the current status of an operation plan instance for decision-making by callers.
The procedures collectively cover the full lifecycle: initialization, validation, activation, completion, splitting, cleanup, status checking, and the exceptional paths of cancel, abort, and rollback.
Tables Accessed
The package reads and writes a range of WMS and MTL tables through APPS synonyms. WMS_DISPATCHED_TASKS and WMS_DISPATCHED_TASKS_HISTORY store active and historical dispatched warehouse tasks, which the runtime APIs create, complete, or cancel. MTL_ONHAND_QUANTITIES_DETAIL provides on-hand inventory positions used during validation and execution. MTL_ITEM_SUB_INVENTORIES and MTL_SECONDARY_INVENTORIES provide item/subinventory and subinventory definitions, while MTL_SECONDARY_LOCATORS supplies locator records for movement and putaway. MTL_SYSTEM_ITEMS, MTL_SYSTEM_ITEMS_B, and MTL_SYSTEM_ITEMS_KFV provide item master attributes and the key flexfield view.
Transaction tables — MTL_MATERIAL_TRANSACTIONS_S, MTL_MATERIAL_TRANSACTIONS_TEMP, and MTL_TRANSACTION_LOTS_TEMP — support inventory transaction creation and lot handling during operation execution. MTL_TXN_REQUEST_LINES holds move-order lines referenced during operation planning. PER_ALL_PEOPLE_F provides the HR person data used for assignment and audit. FND_NEW_MESSAGES is queried to retrieve messages written through the FND message stack. The use of fnd_api and fnd_msg_pub package constants (g_ret_sts_success, g_ret_sts_error, g_ret_sts_unexp_error, g_msg_lvl_error, and similar) confirms the package follows the standard Oracle EBS API error-handling model.
Usage Notes
WMS_ATF_RUNTIME_PUB_APIS is invoked programmatically rather than through a standard window. Callers typically include warehouse execution logic, mobile supply chain application transaction flows, concurrent programs, and custom integration code that needs to drive operation plan instances without direct user interaction. Because the package exposes public APIs, it is safe to call from supported customizations, provided callers honor the FND_API return-status and message conventions.
Typical invocation follows a sequence: initialize the plan instance, validate the operation, activate the instance, and then complete or clean up once execution finishes. Exceptional handling uses cancel, abort, or rollback as appropriate, with CHECK_PLAN_STATUS used between steps to gate progression. Message retrieval is performed through FND_NEW_MESSAGES. As with any EBS public API in this module, upgrades between 12.1.1 and 12.2.2 must be validated against the documented procedures, and direct table manipulation of WMS_DISPATCHED_TASKS or the MTL transaction tables should be avoided in favor of these APIs.