Search Results last_wo_reservation_deleted




Overview

The APPS.CTO_WIP_WORKFLOW_API_PK package body provides the integration layer between Oracle Configure-to-Order (CTO) and discrete manufacturing Work in Process (WIP) workflows within Oracle E-Business Suite. It is the mechanism by which configuration-driven sales order demand is translated into Work Order (WIP) job creation, reservation activity, and Oracle Workflow process orchestration. In the CTO model, a configured item sold on an order must be exploded into its option components and routed to manufacturing for assembly. This package exposes the API surface that coordinates those events, signaling Workflow when a Work Order is created, reserving material for the configured build, monitoring Workflow activity status, and cleaning up reservations and flow schedules when a Work Order is deleted or cancelled. In EBS 12.1.1 and 12.2.2, the object resides in the APPS schema with a VALID status and is classified as an OTHER API, meaning it is not a standard FND-style public API but is instead an internal integration package used primarily by CTO and WIP program units. It depends on a range of foundation packages including FND_API, FND_MSG_PUB, CTO_MSG_PUB, CTO_UTILITY_PK, CTO_WORKFLOW_API_PK, and WF_ENGINE, indicating it participates jointly in the CTO message framework and the Oracle Workflow engine. The package is referenced by fifteen other database objects, confirming its role as a low-level dependency rather than a top-level entry point. It is not itself referenced by external application objects outside the EBS codebase.

Key Procedures and Functions

Seven documented procedures and functions constitute the package interface:

  • FIRST_WO_RESERVATION_CREATED — Signals that the first Work Order reservation for a configured item has been created. This marks the transition of the configuration from planning to execution and typically triggers downstream Workflow processing.
  • LAST_WO_RESERVATION_DELETED — Executes the inverse event, indicating that the final Work Order reservation for a configuration has been removed. Used to drive cleanup and status rollback logic when a build is abandoned or re-planned.
  • FLOW_CREATION — Handles the creation of flow schedules (repetitive/flow manufacturing) associated with the configured Work Order, writing to WIP_FLOW_SCHEDULES.
  • FLOW_DELETION — Correspondingly removes or invalidates flow schedule records when a configured flow Work Order is deleted or cancelled.
  • QUERY_WF_ACTIVITY_STATUS — Retrieves the current activity status of a Workflow process item, querying WF_ITEM_ACTIVITY_STATUSES and WF_PROCESS_ACTIVITIES to report where the build orchestration currently resides.
  • WORKFLOW_BUILD_STATUS — Aggregates Workflow build status information, providing a consolidated view of whether the Workflow-driven build process has completed, is in progress, or is in error.
  • CTO_DEBUG — A diagnostic utility that emits debug output (typically controlled by a profile option and using UTL_FILE) to trace package execution for troubleshooting.

Tables Accessed

The package references a set of base and Workflow tables through APPS synonyms. MTL_RESERVATIONS is the primary transactional table, reflecting the reservation creation and deletion events. OE_ORDER_LINES_ALL is queried to associate Work Order activity back to the originating sales order line configuration. WF_ITEM_ACTIVITY_STATUSES and WF_PROCESS_ACTIVITIES are the Oracle Workflow runtime and definition tables used for status queries. WIP_FLOW_SCHEDULES stores flow manufacturing schedule records for the configured build. DUAL supports scalar evaluation, UTL_FILE provides file-based debug output, and V$PARAMETER2 is read to inspect database initialization parameters at runtime. The INV_RESERVATION_GLOBAL package is also referenced to support reservation handling.

Usage Notes

CTO_WIP_WORKFLOW_API_PK is not designed for direct invocation by end users or custom extensions; it is invoked internally by the CTO and WIP program units during Work Order creation, reservation, and deletion, and by Oracle Workflow activities as configured in the CTO workflow process definitions. In practice, it is triggered by concurrent programs, order import, and the Work Order maintenance flowchart in the manufacturing forms. Because it is documented as not referenced by any non-EBS database object and is itself referenced by fifteen packages, customizations should call the higher-level CTO public APIs (such as those in CTO_WORKFLOW_API_PK) rather than this package directly. Sites enabling CTO_DEBUG output should ensure the profile controlling debug is set appropriately and that the database directory used by UTL_FILE is accessible to the APPS process.