Search Results cbr_preprocess
Overview
GMO_CBR_GRP is an APPS-owned PL/SQL package in Oracle EBS Process Manufacturing (OPM) that supports the Control Batch Recording (CBR) feature. Control Batch Recording provides an audit and approval layer over batch execution: designated events during a batch's lifecycle are captured, evaluated against subscriptions, and recorded in a batch progression history so that quality and compliance personnel can review or release the batch. The package header declares AUTHID CURRENT_USER, indicating that its SQL executes under the privileges of the invoking user rather than the package owner, and the original source file header (GMOGCBRS.pls) shows the package was maintained under version control in the ETRM/OPM code line. The package exposes a mix of procedures invoked directly (for example, from concurrent programs) and a workflow callback function that receives business events raised by the Oracle Workflow Business Event System.
Key Procedures and Functions
- ENABLE_CBR — Concurrent-request entry point that enables control batch recording, exposing standard concurrent program OUT parameters (ERRBUF, RETCODE).
- UPDATE_EVENT — Updates a batch progression row with a new event date and status, taking an E-record identifier, batch progression identifier, event date, and status as inputs.
- PROCESS_EVENT — Workflow subscription callback invoked when a subscribed event fires; receives the subscription GUID and the workflow event object and returns a status indicator.
- INSERT_EVENT — Inserts a new batch progression record to capture an event against the batch.
- CBR_PREPROCESS — Performs pre-processing work required before events are recorded or evaluated, preparing data for the CBR flow.
- INSERT_BATH_EVENTS — Bulk insertion routine for batch events, allowing a set of events to be persisted in the progression table in a single pass.
- PROCESS_INSTANCE_INSTR_SET — Processes the instruction set associated with a batch process instance; this is the routine directly matching the searched term. It evaluates the instruction set tied to the running process instance so that the relevant control events are identified and progressed through the CBR recording flow.
- DELETE_PROGRESSION_ROW — Removes a batch progression row, supporting corrections or reversal of an incorrectly recorded event.
Tables Accessed
The package reads and writes the core OPM batch execution tables: GME_BATCH_HEADER, GME_BATCH_STEPS, GME_BATCH_STEP_ACTIVITIES, and GME_BATCH_STEP_RESOURCES, which describe the batch and its steps, activities, and resource usage; GMD_SAMPLES and QA_RESULTS for quality sampling and results; and GMO_MATERIAL_DISPENSES, GMO_MATERIAL_UNDISPENSES, and GMO_LABEL_HISTORY for dispensing, undispensing, and label activity. These execution records are the source events for CBR. The package persists progression data in GMO_BATCH_PROGRESSION and its sequence GMO_BATCH_PROGRESSION_S, with GMO_CBR_XML holding XML payloads for the recorded events. WF_EVENT_T and WF_EVENT_SUBSCRIPTIONS are the Workflow Business Event System structures that drive event delivery to PROCESS_EVENT.
Usage Notes
GMO_CBR_GRP is typically invoked in two ways. First, ENABLE_CBR is registered as a concurrent program so that CBR can be turned on for the organization or batch scope. Second, PROCESS_EVENT is registered as a Workflow event subscription callback for the events CBR monitors; when a subscribed event fires, Workflow calls the function with the subscription GUID and event payload, and the package records or updates the batch progression accordingly. The remaining procedures (UPDATE_EVENT, INSERT_EVENT, INSERT_BATH_EVENTS, CBR_PREPROCESS, PROCESS_INSTANCE_INSTR_SET, DELETE_PROGRESSION_ROW) are helper entry points called from within the CBR flow or from custom extensions that need to record, correct, or bulk-load progression data. Because the package is not referenced by other seeded packages, it should be treated as a leaf API: customizations may call it, but changes to its signature carry no downstream seeded dependencies. Direct table-level DML should be avoided in favor of these procedures to preserve consistency between GMO_BATCH_PROGRESSION and its XML payloads.