Search Results okc_terms_tmpl_approval_pvt




Overview

OKC_ART_BLK_PVT is a private (PVT) PL/SQL package in the APPS schema that supports the bulk processing of contract articles within Oracle E-Business Suite Contract Management (OKC), part of the Enterprise Contracts / ETRM (Enterprise Transaction and Reference Management) module stack. The package name reflects its role as an internal "article block" handler: it consolidates the operations required to validate, adopt, submit for approval, approve, and reject articles in bulk rather than one at a time. These operations underpin template article lifecycle management, which is why the package is referenced by OKC_TERMS_TMPL_APPROVAL_PVT and OKC_TERMS_QA_PVT.

In EBS 12.1.1 and 12.2.2 the package retains the same core responsibilities. It is a private worker package: business logic is not meant to be called directly by customers, and its procedures are invoked by public packages or by the Oracle Forms-based contract authoring UI. The package depends on FND_API for the standard error-handling and message-stack conventions (FND_MSG_PUB), so failures raise and propagate standard API errors.

Key Procedures and Functions

  • GET_UNIQ_ID — generates a unique identifier used to key the temporary block-processing structures; typically used to isolate concurrent bulk sessions so that temporary rows are not mixed between users or requests.
  • VALIDATE_ARTICLE_VERSIONS_BLK — performs bulk validation of article versions, checking that the versions selected for processing are internally consistent and eligible for the requested action before any data is changed.
  • AUTO_ADOPT_ARTICLES_BLK — drives the automatic adoption of articles on a contract, inserting or updating adoption records so that a set of articles becomes active on the target contract without manual intervention.
  • PENDING_APPROVAL_BLK — moves a block of articles or article versions into a pending-approval state, making them available to the approval workflow.
  • APPROVE_BLK — approves a block of articles, updating status and adoption information so the articles become effective.
  • REJECT_BLK — rejects a previously submitted block of articles, returning them to an editable state and recording the rejection outcome.

These procedures share the FND_API savepoint/rollback pattern: each block routine raises exceptions on validation failure and rolls back to its savepoint so that partial bulk updates are not committed.

Tables Accessed

  • OKC_ARTICLES_ALL — master article definitions; read and updated as articles are approved, rejected, or adopted.
  • OKC_ARTICLE_VERSIONS — version-level rows whose status is validated and changed by the block procedures.
  • OKC_ARTICLE_ADOPTIONS — records the adoption of an article version on a contract; written by AUTO_ADOPT_ARTICLES_BLK and adjusted by APPROVE_BLK/REJECT_BLK.
  • OKC_ARTICLE_RELATNS_ALL — article-to-article relationships that must remain consistent when a block of articles changes status.
  • OKC_ARTICLE_VARIABLES, OKC_BUS_VARIABLES_B, OKC_BUS_VARIABLES_TL — business-variable definitions used to validate article content and substitutions during bulk processing.
  • OKC_ART_BLK_TEMP, OKC_ART_BLK_TEMP_S1 — temporary staging tables (with a sequence) holding the block of article IDs being processed in the current session.
  • FND_FLEX_VALUE_SETS — flexfield value-set lookup used for validating key flexfield article attributes.
  • HR_ORGANIZATION_INFORMATION — organizational context (operating unit/legal entity) needed to scope records correctly.
  • DUAL and PLITBLM — standard single-row and PL/SQL index-by table utilities.

Usage Notes

OKC_ART_BLK_PVT is not a public API; it is documented as referenced by OKC_TERMS_TMPL_APPROVAL_PVT and OKC_TERMS_QA_PVT, both of which wrap its block logic. In practice it is invoked when a user submits a set of contract terms or template articles for approval and then approves or rejects them through the Contracts authoring forms, and when the approval workflow processes pending template articles. Customizations should call the public wrapper packages (for example OKC_TERMS_TMPL_APPROVAL_PVT) rather than OKC_ART_BLK_PVT directly, because the private package relies on caller-populated temporary tables (OKC_ART_BLK_TEMP) and on a valid FND_API message stack. Direct calls risk orphaned temporary rows and inconsistent validation state.