Search Results assign_task_inv
Overview
APPS.PJM_TASK_AUTO_ASSIGN is a PL/SQL package in Oracle EBS that implements automatic task assignment logic for project-related transactions. Its central business purpose is to derive an appropriate project task (or a default task identifier) when transaction records are created but the task is not explicitly supplied by the user or feeder system. The package is declared AUTHID CURRENT_USER and exposes two distinct categories of entry points: ..._TASK_WNPS resolver functions and ASSIGN_TASK_... assignment routines.
The WNPS suffix refers to the Oracle pragma RESTRICT_REFERENCES(..., WNDS, WNPS) — Write No Database State and Write No Package State. This constraint is significant: it certifies that the resolver functions do not mutate data, which allows them to be invoked safely from SQL statements, most notably from views. The header comment explicitly confirms this design intent, stating that each function "returns a task based on predefined rules and is specially designed for using in views." This is why the package is a common dependency for view definitions that expose a derived task value alongside transactional columns.
Key Procedures and Functions
The documented package contains six callable program units:
- INV_TASK_WNPS — Inventory-side resolver. Returns a task based on predefined rules, operating in the context of an inventory transaction. Its inputs address organization, project, item, purchase order, category, and subinventory context, allowing rules to be evaluated against the receiving or issuing scenario.
- WIP_TASK_WNPS — Work-in-Process resolver for discrete or flow manufacturing transactions. It evaluates organization and project identifiers together with WIP entity, assembly item, operation, and department attributes to determine the applicable task.
- WIPMAT_TASK_WNPS — WIP material transaction resolver. Combines both WIP and material context — item, category, subinventory, WIP entity, assembly, operation, and department — to resolve a task for material movements issued to or returned from a work order.
- SCP_TASK_WNPS — Supply Chain Planning resolver. Provides the same task resolution behavior for transactions originating in the planning domain.
- ASSIGN_TASK_INV — Inventory assignment routine. Unlike the resolver functions, this procedure writes the task assignment back to inventory transaction records.
- ASSIGN_TASK_WIPL — WIP assignment routine that persists task assignments against WIP transaction and accounting records.
Tables Accessed
The resolver functions read project and manufacturing setup data: PA_PROJECTS_ALL for project validation, PJM_DEFAULT_TASKS for the configured default task rules, WIP_ENTITIES and WIP_OPERATIONS for work order and routing context, and WIP_FLOW_SCHEDULES for flow manufacturing. Inventory context is derived from MTL_ITEM_CATEGORIES, MTL_DEFAULT_CATEGORY_SETS, MTL_INTERORG_PARAMETERS, and MTL_MATERIAL_TRANSACTIONS. Routing information is read from BOM_OPERATIONAL_ROUTINGS and BOM_OPERATION_SEQUENCES. The assignment routines write to WIP_TRANSACTIONS, WIP_TRANSACTION_ACCOUNTS, and WIP_TXN_INTERFACE_ERRORS, the latter capturing failures during interface processing so that they can be corrected and resubmitted.
Usage Notes
Because of its WNDS/WNPS declarations, INV_TASK_WNPS, WIP_TASK_WNPS, WIPMAT_TASK_WNPS, and SCP_TASK_WNPS are safe to embed in SQL view definitions and in SELECT-list expressions. Oracle's seeded transaction views in the Inventory, WIP, and Planning products rely on this pattern to display a derived task number without requiring the caller to perform procedural lookups. The ASSIGN_TASK_INV and ASSIGN_TASK_WIPL procedures are invoked from transaction processing paths — concurrent programs, transaction manager workers, and custom PL/SQL that must persist the resolved task onto the transaction record. The package is referenced by five other packages, confirming its role as a shared utility. Customizations should call the documented entry points rather than replicating rule logic, since PJM_DEFAULT_TASKS configuration drives the resolution outcome.