Search Results g_msg_lvl_unexp_error




Overview

WSM_LOG_PVT is a private PL/SQL package body in the APPS schema that provides a centralized logging and error-handling facility for the Oracle E-Business Suite Workflow and Shop Floor Management (WSM) module. The package is classified as PVT (private), indicating that it is intended for internal use by other WSM packages rather than as a directly callable public API. Its principal role is to standardize the way WSM components record diagnostic messages, log procedure entry parameters, capture unexpected exceptions, and persist interface errors for later investigation.

The package body establishes a set of package-level constants that map WSM logging semantics onto the Oracle Application Object Library's message and logging infrastructure. Specifically, it binds G_MSG_LVL_UNEXP_ERROR, G_MSG_LVL_ERROR, G_MSG_LVL_SUCCESS, and the DEBUG_HIGH, DEBUG_MEDIUM, and DEBUG_LOW levels to their corresponding values in FND_MSG_PUB. It also defines local log level variables sourced from FND_LOG (LEVEL_PROCEDURE and LEVEL_UNEXPECTED). This design ensures that messages written by WSM processes appear in the standard EBS logging and message stacks with consistent severity categorization.

Key Procedures and Functions

  • LOGPROCPARAMS — Writes the parameters passed into a procedure to the FND_LOG facility. It accepts a module name, a parameter table, and an FND log level, and iterates through the parameter table to emit each parameter name and value when procedure-level logging is enabled.
  • LOGMESSAGE — Provides the general-purpose entry point for recording messages at a specified message level. It is used throughout WSM code to emit error, success, and diagnostic text.
  • HANDLE_OTHERS — Implements the standard WHEN OTHERS exception handler, converting an unhandled PL/SQL error into a WSM message (typically at the unexpected error level defined by G_MSG_LVL_UNEXP_ERROR) and logging it appropriately.
  • WRITETOWIE — Persists error information to the Workflow Interface Errors (WIE) structure, used when WSM processing must record failures for later correction or review.
  • UPDATE_ERRTBL — Updates the interface error table with error details, supporting status tracking for failed interface records.
  • POPULATEINTFINFO — Populates interface-related information, providing the descriptive context (such as source and record identifiers) required by the error-recording routines.

Tables Accessed

  • WSM_INTERFACE_ERRORS — The primary table for storing interface processing errors. It is written and updated by WRITETOWIE and UPDATE_ERRTBL.
  • PLITBLM — A standard EBS table used in conjunction with FND_MSG_PUB for temporary message storage during message token substitution.

Usage Notes

WSM_LOG_PVT is not intended for direct invocation by end users. It is referenced by twelve other WSM packages, which rely on it as the common logging and error-handling layer. Typical invocation occurs from WSM concurrent programs and PL/SQL business logic that populate or process interface data. Developers extending WSM should call the public procedures of the owning packages rather than WSM_LOG_PVT directly, since it is a private implementation package. The reliance on G_MSG_LVL_UNEXP_ERROR and the related FND_MSG_PUB constants means that message behavior is governed by the standard FND logging profile options, and diagnostic output can therefore be enabled or suppressed at runtime without code changes.