Search Results terminate_batch




Overview

GME_TERMINATE_BATCH_PVT is a private (PVT) PL/SQL API in the Oracle E-Business Suite Process Manufacturing (OPM) application, owned by the APPS schema. It provides the internal programmatic interface used to terminate a production batch that is already in progress within Oracle Process Manufacturing. The package encapsulates the business logic required to halt an active batch cleanly, ensuring that associated batch steps, material transactions, and any running Oracle Workflow processes are brought to a controlled state rather than being abandoned mid-execution.

The package source header (GMEVTRBS.pls) identifies it as the "Package Specification for the GME batch terminate api," authored by Pawan Kumar in May 2005. The _PVT suffix indicates this is a private API intended for internal consumption by other OPM packages, forms, and workflow components rather than a public, customer-callable interface. In the ETRM 12.1.1 and 12.2.2 data models, this object forms part of the batch lifecycle management layer that supports the GME (Process Manufacturing) schema objects.

Key Procedures and Functions

The package exposes two documented procedures:

  • TERMINATE_BATCH — The core procedure that performs the batch termination. It accepts a batch header record as input and returns the resulting batch header record along with a return status indicator, allowing the caller to confirm success or diagnose failure. Internally, this procedure drives the state transition that marks the batch as terminated and coordinates the downstream cleanup of steps and material associations. The x_return_status out parameter follows Oracle's standard API error-handling convention.
  • ABORT_WF — A supporting procedure that aborts a running Oracle Workflow process. It accepts a workflow type and item identifier so that any workflow instance tied to the terminating batch is stopped, preventing orphaned or dangling workflow activities after termination. This is invoked as part of, or alongside, the termination sequence.

Tables Accessed

Through APPS synonyms, the package reads and writes the following documented tables:

  • GME_BATCH_HEADER — The primary batch record. Termination updates the batch header to reflect the terminated status, and the procedure signature operates directly on a GME_BATCH_HEADER%ROWTYPE.
  • GME_BATCH_STEPS — Stores the individual processing steps of a batch; these are updated or closed out as part of termination so no step remains open.
  • GME_MATERIAL_DETAILS — Holds material consumption and production detail lines; termination logic reconciles these to reflect the halted state.
  • PLITBLM — A PL/SQL index-by table type used internally for bulk processing and collection handling within the package logic.

Usage Notes

As a PVT-class API, GME_TERMINATE_BATCH_PVT is not intended for direct invocation by end users or arbitrary customizations. It is referenced by one other package within the OPM codebase and is typically driven from:

  • OPM batch maintenance forms, where a user action to terminate a batch triggers the underlying API call.
  • Workflow-enabled batch processes that require programmatic cancellation of an in-flight batch and its associated workflow.
  • Other internal OPM packages performing batch cleanup or exception handling.

Custom code should generally call the corresponding public API wrapper rather than this private package directly, since the private interface carries no compatibility guarantee across releases and its signature may change between 12.1.1 and 12.2.2. The presence of ABORT_WF underscores that batch termination in OPM is workflow-coupled; callers must ensure the correct workflow type and item identifier are supplied to avoid leaving workflow processes active.