Search Results is_contract_approved




Overview

OKC_REP_WF_PVT is a private PL/SQL package owned by the APPS schema within the Oracle E-Business Suite Contracts (OKC) module, specifically the Contract Repository and approval-management subsystem. Its singular purpose is to expose the set of server-side functions and procedures that the Oracle Workflow engine (Workflow Item Type) calls in order to drive the contract approval lifecycle. As a "PVT" (private) classified API, it is not intended for direct invocation by external consumers; it is the internal callback layer referenced by the Contracts approval workflow definition.

The package facilitates the electronic approval routing and decisioning of contracts by integrating the Contract Repository with Oracle Workflow Notification Mailer and, in many configurations, Oracle Approvals Management (AME). It supplies workflow attributes, determines whether additional approvers remain, records approve/reject outcomes, monitors AME status, and controls notification behaviors such as approver edits and previews.

Key Procedures and Functions

The package exposes sixteen documented procedures and functions. The principal Workflow-callback procedures follow a standard signature group—itemtype, itemkey, actid, funcmode, and a single-character resultout—which is the conventional contract for PL/SQL Workflow function activity handlers.

  • INITIALIZE_ATTRIBUTES — invokes Workflow to initialize the item-type attributes for the contract approval process.
  • HAS_NEXT_APPROVER — determines whether the current approval list contains a subsequent approver and returns the appropriate result to the Workflow engine.
  • APPROVE_CONTRACT — records a contract approval action and advances the approval workflow accordingly.
  • REJECT_CONTRACT — records a contract rejection action and transitions the workflow.
  • UPDATE_AME_STATUS — refreshes the AME (Approvals Management Engine) status for the contract.
  • UPDATE_AME_STATUS_DETAILED — the detailed variant of the AME status update, providing granular status handling.
  • IS_CONTRACT_APPROVED — evaluates whether the contract has attained full approval.
  • IS_CONTRACT_APPROVED_DETAILED — the detailed variant of the approval check.
  • IS_APPROVAL_COMPLETE — determines whether the overall approval cycle has completed.
  • COMPLETE_NOTIFICATION — marks the associated Workflow notification as complete.
  • CON_HAS_TERMS — tests whether the contract carries associated terms.
  • CON_ATTACH_GENERATED_YN — determines whether a generated document attachment exists for the contract.
  • CHECK_CURRENT_APPROVER — validates and identifies the approver currently responsible for the action.
  • ALLOW_APPROVER_EDIT — governs whether the assigned approver may edit the contract before acting.
  • CONTRACT_PREVIEW_YN — controls whether a contract preview is available to the approver.
  • APPS_INITIALIZE — the standard Oracle EBS initialization routine that establishes session context (user, responsibility, application) for the package.

Tables Accessed

The package reads and writes across Contracts, Human Resources, Workflow, and reference tables, all via APPS synonyms. Contract Repository tables include OKC_REP_CONTRACTS_ALL and OKC_REP_CONTRACT_VERS (contract header and version data), OKC_REP_CON_APPROVALS (approval records), OKC_CONTRACT_DOCS (contract documents/attachments), and OKC_BUS_DOC_TYPES_B (business document type definition). Approver identity and authority are validated against PER_ALL_PEOPLE_F, PER_ALL_ASSIGNMENTS_F, PER_ASSIGNMENT_STATUS_TYPES, and JTF_RS_RESOURCE_EXTNS—the latter providing resource-level attributes for approval routing. Workflow interaction relies on WF_ITEMS and WF_NOTIFICATIONS to inspect and update item and notification state. FND_USER resolves the acting user, and PLITBLM is used for the standard Workflow/PL/SQL character-handling utility functions.

Usage Notes

OKC_REP_WF_PVT is invoked almost exclusively by the Oracle Workflow runtime via the Contracts approval item type defined in the Contract Repository. It is not a public API and is documented as referenced by zero other packages, confirming its role as a leaf-level callback layer. Administrators and developers typically encounter it while troubleshooting stalled contract approvals, debugging notification behavior, or reviewing the Workflow Activity function definitions configured for contract approval. Because it manipulates approval decisions and AME status, custom code should never call these routines directly; any extension of contract approval logic should be implemented through configuration of the item type or via supported public APIs rather than through this private package.