Search Results record_process_success




Overview

CN_UTILS is a shared utility package in the Oracle E-Business Suite (EBS) 12.1.1 and 12.2.2 codebase, owned by the APPS schema and classified as an "OTHER" API rather than a published business API. It belongs to the Oracle Contracts (CN) product family and provides low-level plumbing used by the contracting infrastructure rather than end-user business logic. The package combines three distinct responsibilities: source-code storage and formatting helpers for the CN_SOURCE metadata repository, module lifecycle maintenance, and a lightweight process-auditing framework built around the CN_PROCESS_AUDITS table.

The package's source header (cnsyutls.pls, version 120.3) dates from the mid-1990s and reflects the historical practice of storing PL/SQL source text, indentation information, and object metadata inside database tables for the Contracts "modular" architecture. CN_UTILS is documented with 52 procedures and functions and is referenced by nine other packages, confirming its role as an internal foundation utility.

Key Procedures and Functions

The documented interface falls into several functional groups.

  • Session context: SET_ORG_ID and UNSET_ORG_ID establish and clear the current organization context for subsequent operations within the same session.
  • Module maintenance: DELETE_MODULE removes obsolete rows from the source and dependency tables for a given module.
  • Code handling: INIT_CODE, INDENT, and UNINDENT initialize and adjust the code_type / clob_code_type records that carry source text, line numbers, and indentation. APPEND, APPIND, APPENDCR, and APPINDCR append text with or without indentation and carriage returns, while STRIP and STRIP_PREV remove formatting whitespace and DUMP_LINE outputs a formatted line.
  • Boilerplate generation: PKG_INIT, PKG_END, PKG_END_BOILERPLATE, and PROC_INIT emit standard package and procedure skeletons.
  • Process auditing (the focus of the search term "record_process_success"): RECORD_PROCESS_START, RECORD_PROCESS_SUCCESS, and RECORD_PROCESS_EXCEPTION form a matched trio that logs the beginning, successful completion, or failure of a unit of work into the process audit table. These routines are the canonical way for Contracts programs to record an auditable outcome without writing bespoke INSERT statements.

Tables Accessed

CN_UTILS operates against the Contracts metadata and audit schema, primarily through APPS synonyms. CN_SOURCE, CN_SOURCE_ALL, and CN_SOURCE_S hold the stored source text manipulated by the formatting routines. CN_OBJECTS, CN_OBJECTS_S, CN_MODULES, CN_MOD_OBJ_DEPENDS, and CN_MOD_OBJ_DEPENDS_S define object and module relationships that DELETE_MODULE prunes. CN_PROCESS_AUDITS and CN_PROCESS_AUDITS_S receive the rows written by the RECORD_PROCESS_* procedures. CN_REPOSITORIES, CN_DIM_HIERARCHIES, CN_EVENTS, and CN_PERIOD_STATUSES_ALL support repository lookup, hierarchy, event, and period-status operations invoked by the package's callers. DBMS_LOB is used for the CLOB-based source handling.

Usage Notes

CN_UTILS is an internal utility and is not intended for direct invocation from Oracle Forms or concurrent program definitions. It is called by the nine dependent Contracts packages to generate boilerplate code, manage stored module source, and record process outcomes. The RECORD_PROCESS_SUCCESS procedure is typically invoked at the end of a Contracts batch or API execution, with RECORD_PROCESS_START preceding it and RECORD_PROCESS_EXCEPTION called in exception handlers, producing a complete audit trail in CN_PROCESS_AUDITS. SET_ORG_ID and UNSET_ORG_ID should bracket any multi-org sensitive operation. Because the package is undocumented as a public API, customizations should avoid calling it directly and should instead rely on the supported Contracts APIs that wrap it.