Search Results okc_contract_approval_pvt




Overview

OKC_CONTRACT_APPROVAL_PVT is a private PL/SQL package in the APPS schema that provides the internal engine for contract approval processing within Oracle Enterprise Contract Management and Procurement (often referenced as ETRM). It is the private counterpart to OKC_CONTRACT_APPROVAL_PUB, and it encapsulates the logic used to start, monitor, stop, and complete approval workflows for contracts stored in the OKC (Contracts Core) tables. Working jointly with Oracle Workflow, the package evaluates the contract's lifecycle status, manages the associated approval process definition, and coordinates signature and approval transitions.

The package is classified as PVT, meaning it is not part of the supported public API surface and should not be called directly by customer code. It exists to be invoked by the public wrapper package, the workflow activity functions (OKC_WF_K_APPROVE and OKS_WF_K_APPROVE), and internal recursion within itself. Its procedures are designed around the workflow "K" (contract) process, orchestrating approval state changes across headers and lines.

Key Procedures and Functions

The package exposes ten documented procedures and functions:

  • K_APPROVAL_START — initiates the approval workflow for a contract, typically invoked when a contract is submitted for approval.
  • CONTINUE_K_PROCESS — resumes or advances an in-progress approval process, used by workflow callbacks to move the contract to its next state.
  • K_APPROVAL_STOP — terminates an active approval workflow, for example when a contract is withdrawn or cancelled.
  • K_ACCESIBLE — evaluates whether the approval process is accessible or eligible under current conditions.
  • K_APPROVED — records and processes the approved state of the contract.
  • K_ERASE_APPROVED — clears a previously recorded approval, supporting reversal or re-approval scenarios.
  • K_SIGNED — handles the signed state transition of a contract within the approval lifecycle.
  • WF_MONITOR_URL — generates the workflow monitoring URL used to track the approval process instance.
  • WF_COPY_ENV — copies workflow environment attributes, supporting consistent runtime context across workflow activities.
  • ACTIVATE_TEMPLATE — activates the approval template associated with the contract's process definition.

These routines collectively manage the start-to-finish lifecycle of a contract approval, from template activation and workflow launch through signed and approved states, and finally to stop or erase.

Tables Accessed

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

It also depends on OKC_API and the STANDARD package.

Usage Notes

This package is invoked indirectly. The Contract Management forms and the public OKC_CONTRACT_APPROVAL_PUB package call it to submit contracts for approval, and the workflow activity packages OKC_WF_K_APPROVE and OKS_WF_K_APPROVE call it as workflow nodes execute. Direct custom invocation is not supported because the package is private and its interface may change without notice. Customizations should use the public API instead. The package is available in both 12.1.1 and 12.2.2 releases.