Search Results k_approved




Overview

OKC_CONTRACT_APPROVAL_PUB is the public PL/SQL API package for contract approval processing within Oracle E-Business Suite's Enterprise Contracts (OKC / ETRM) module. It serves as the externally callable wrapper layer over the private implementation package OKC_CONTRACT_APPROVAL_PVT, which contains the actual business logic. The public package exposes a stable, supported interface that shields calling code — forms, concurrent programs, and custom extensions — from internal implementation changes to the private kernel.

The package governs the lifecycle of the approval workflow attached to a contract: initiating approval, monitoring its progress, terminating it, and evaluating resulting status flags such as accessibility, approval, signature, and template activation. Because contract approval in EBS is driven through the Oracle Workflow engine, the package bridges the contract data model and the workflow runtime. A package-level debug flag (l_debug) derived from the AFLOG_ENABLED profile option supports diagnostics, and the header identifies the source as OKCPCAPB.pls version 120.3, last modified in December 2005 and marked as a non-shipped internal version in that snapshot.

Key Procedures and Functions

  • K_APPROVAL_START — Initiates the approval process for a given contract. It accepts API-standard arguments (API version, initialization flag, return status, message count, message data) together with contract and process identifiers, a commit control flag, an access level, and optional user, responsibility, application, and security group context. It delegates directly to the private kernel, passing all parameters through unchanged.
  • WF_MONITOR_URL — A function returning a VARCHAR2 URL used to link the caller to the Oracle Workflow monitor for a specific contract and process, with a display mode parameter. This supports the "view approval status" navigation common in contract forms.
  • K_APPROVAL_STOP — Terminates or halts an in-progress approval for a contract.
  • WF_COPY_ENV — Copies workflow environment attributes, typically used when instantiating or duplicating a workflow context for a contract approval.
  • K_ACCESIBLE — Returns a status indicator reflecting whether the approval is accessible to the calling user or context.
  • K_APPROVED — Evaluates and returns whether the contract has reached an approved state.
  • K_ERASE_APPROVED — Clears or resets the approved status, supporting re-approval or correction scenarios.
  • K_SIGNED — Returns whether the contract has completed signature processing, relevant to ETRM's signature and acceptance features.
  • ACTIVATE_TEMPLATE — Activates an approval template definition, enabling its use for contract approvals.

Tables Accessed

The ETRM metadata records that this package accesses the contract data model exclusively through APPS synonyms rather than direct schema-qualified references. Contract header and approval workflow state are maintained in the OKC contract tables, while workflow metadata and activity status are read from the Oracle Workflow tables (WF_*). Status queries such as K_APPROVED, K_SIGNED, and K_ACCESIBLE read the current approval and signature attributes of the contract record, while K_APPROVAL_START, K_APPROVAL_STOP, and K_ERASE_APPROVED update that state in conjunction with Workflow engine calls. WF_COPY_ENV and ACTIVATE_TEMPLATE operate against workflow configuration structures. Because the public body is a thin delegation layer, the physical DML is performed by OKC_CONTRACT_APPROVAL_PVT.

Usage Notes

This is a PUB-classified API and is the correct entry point for external callers; direct invocation of OKC_CONTRACT_APPROVAL_PVT is not supported. Standard usage includes initiation from the Contract Authoring or Approval forms when a user submits a contract for approval, programmatic calls from concurrent programs that batch-process approval state, and callouts from custom PL/SQL that must start or inspect an approval. The associated k_approval_start entry in the source corresponds exactly to the K_APPROVAL_START procedure clients reference. ETRM metadata further indicates the package is referenced by eight other packages, confirming it as a foundational dependency in the ETRM approval architecture across both 12.1.1 and 12.2.2. Callers should always supply the full API-standard parameter set for validation and message handling.