Search Results okc_k_entity_locks_grp




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

OKC_K_ENTITY_LOCKS_GRP is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite, classified as a "GRP" (group) API within the Oracle Contracts (OKC) module. Its primary business function is to manage concurrency locks on contract entities — clauses, sections, deliverables, and entire contract documents — so that multiple users or concurrent processes do not simultaneously modify the same contractual content. This is essential in the Contract Terms and Conditions (ETRM/Terms) authoring environment, where several authors may work on different parts of a contract repository at the same time.

The package records lock ownership in the OKC_K_ENTITY_LOCKS table and provides APIs to acquire, test, release, and rebuild those locks. It also supports workflow notification when a lock is contested and provides utility functions that resolve entity titles and source document details for display and diagnostic purposes.

Key Procedures and Functions

  • LOCK_ENTITY / UNLOCK_ENTITY — Acquire or release a lock on a specific contract entity for the current user.
  • RELEASE_LOCKS — Release multiple or all locks held, typically on session exit or transaction completion.
  • REBUILD_LOCKS / REBUILD_IDS — Regenerate lock records and identifier sequences after data migration, copy, or corruption.
  • REVERT_CHANGES / REVERT_ENTITY — Roll back uncommitted changes to an entity, restoring the previous locked state.
  • CHECKBASERECEXISTS — Verify the underlying base record exists before allowing lock operations.
  • ISLOCKEXISTS — Test whether any lock is currently held on a given entity.
  • GET_DOCUMENT_NUMBER / GET_ENTITY_TITLE / GET_SRC_DOC_DETAILS — Retrieve descriptive identification and source document details for locked entities.
  • ISCLAUSELOCKEDBYOTHERDOC, ISSECTIONLOCKEDBYOTHERDOC, ISDELIVERABLELOCKEDBYOTHERDOC, ISXPRTLOCKEDBYOTHERDOC, ISENTITYLOCKEDBYOTHERDOC — Boolean checks determining whether a specific entity type is locked by a document other than the caller's.
  • ISANYCLAUSELOCKEDBYOTHERDOC / ISANYENTITYLOCKEDBYOTHERDOC — Aggregate checks across all clauses or all entities in a document.
  • START_NOTIFY_WORKFLOW — Initiate a workflow notification when a user needs to be alerted about a contested lock.

The metadata documents 23 procedures/functions in total, confirming the package's comprehensive role in lock lifecycle management.

Tables Accessed

The package reads and writes OKC_K_ENTITY_LOCKS and OKC_K_ENTITY_LOCKS_S, the core lock repository and its sequence. It also references OKC_ARTICLES_ALL, OKC_K_ARTICLES_B, OKC_K_ARTICLES_B_S, OKC_K_ART_VARIABLES, OKC_K_ART_VAR_EXT_B, OKC_K_ART_VAR_EXT_TL, and OKC_SECTIONS_B for clause, section, and variable metadata; OKC_DELIVERABLES and OKC_DELIVERABLE_ID_S for deliverable entities; OKC_BUS_DOC_TYPES_TL and OKC_BUS_VARIABLES_B for document type and variable definitions; and CZ_CONFIG_HDRS, FND_USER for configuration and user context. These are accessed through APPS synonyms.

Usage Notes

This package is not typically invoked directly by end users. It is called programmatically by higher-level ETRM packages such as OKC_K_ARTICLES_GRP, OKC_TERMS_COPY_GRP, OKC_TERMS_SECTIONS_GRP, OKC_TERMS_UTIL_GRP, OKC_TEMPLATE_USAGES_PVT, and OKC_XPRT_UTIL_PVT, and by PO_MOD_CONTROL_PVT in the purchasing module. It is referenced by eleven other packages in total. Custom code extending contract authoring or copy functionality should call these APIs rather than manipulating OKC_K_ENTITY_LOCKS directly, ensuring concurrency integrity and consistent workflow notification.