Search Results check_for_active_process
Overview
OKS_AUTH_INT_PUB is a public PL/SQL package in the APPS schema that provides authorization and process-verification services for Oracle Service Contracts (OKS) and its underlying contract repository, Oracle Contracts Core (OKC). Its primary business role is to answer authorization questions before a contract transaction is allowed to proceed: whether a contract currently has an active workflow or process running against it, and whether the calling context is permitted to commit changes to a contract document. The package is classified as a PUB (public) API, indicating that it is intended for supported external invocation by other EBS modules and custom code rather than as a private implementation detail. Both documented entry points delegate the substantive work to the OKC contract infrastructure — OKC_CONTRACT_PUB.Get_Active_Process and the OKC_K_HEADERS_ALL_B header table — positioning OKS_AUTH_INT_PUB as a thin authorization façade over the Contracts Core processing model.
Key Procedures and Functions
- CHECK_FOR_ACTIVE_PROCESS — Returns a Boolean indicating whether a given contract, identified by contract number and contract number modifier, currently has an active process (for example a running workflow). It calls
OKC_CONTRACT_PUB.Get_Active_Process, which returns the workflow name, workflow process name, package name, procedure name, and usage of any process bound to the contract. The function returns TRUE when the returned workflow name is not null and FALSE when it is null. If the underlying call does not return a success status, it raisesOKC_API.G_EXCEPTION_UNEXPECTED_ERROR, so callers must be prepared to handle that exception rather than treating a negative answer as an error. - OK_TO_COMMIT — Determines whether the caller is authorized to commit changes to a specific contract document. It receives the document identifier together with a document validation string, and returns a Boolean result while also returning the standard API return status, message count, and message data. Internally it opens an explicit cursor over the contract header to retrieve the header identifier, start date, contract number, contract number modifier, object version number, and status code, which forms the basis of the commit-eligibility decision (for example, rejecting commits against headers whose status or version no longer matches the caller's expectation).
Tables Accessed
The package reads contract header data from OKC_K_HEADERS_ALL_B, the base table holding contract header records in Oracle Contracts Core. It is accessed via an APPS synonym. The query in OK_TO_COMMIT selects the header ID, start date, contract number, contract number modifier, object version number, and status code for a given document ID. This table is the authoritative source for the header-level attributes needed to validate a commit request, and the object version number in particular supports optimistic concurrency checking. No other tables are documented as being referenced directly by this package; all workflow and process metadata is obtained indirectly through the OKC_CONTRACT_PUB API rather than through direct SQL.
Usage Notes
OKS_AUTH_INT_PUB is typically invoked from Service Contracts forms, business logic layers, and custom extensions that need to guard contract modification against concurrent workflow activity or unauthorized commits. A standard pattern is to call CHECK_FOR_ACTIVE_PROCESS before initiating a contract change so that the user is blocked while an approval or other workflow is in flight, and to call OK_TO_COMMIT immediately before issuing a database commit on contract header changes. Both functions are also natural candidates for use inside concurrent programs and integration interfaces that process contracts in bulk. Because the package raises OKC_API.G_EXCEPTION_UNEXPECTED_ERROR on failed underlying API calls, callers should wrap invocations in exception handlers. The package is available in both Oracle EBS 12.1.1 and 12.2.2; the header comment indicates a stable implementation lineage, and it is referenced by one other documented package, so changes to its behavior can have downstream effects.
-
PACKAGE BODY: APPS.OKS_AUTH_INT_PUB
12.1.1
-
PACKAGE BODY: APPS.OKS_AUTH_INT_PUB
12.2.2
-
PACKAGE: APPS.OKS_AUTH_INT_PUB
12.1.1
-
PACKAGE: APPS.OKS_AUTH_INT_PUB
12.2.2
-
APPS.OKS_AUTH_INT_PUB dependencies on OKS_AUTH_INT_PUB
12.1.1
-
APPS.OKS_AUTH_INT_PUB dependencies on OKS_AUTH_INT_PUB
12.2.2
-
APPS.OKS_AUTH_INT_PUB dependencies on OKS_EXTWAR_UTIL_PUB
12.1.1
-
APPS.OKS_AUTH_INT_PUB dependencies on OKS_EXTWAR_UTIL_PUB
12.2.2
-
APPS.OKS_AUTH_INT_PUB dependencies on OKC_API
12.1.1
-
APPS.OKS_AUTH_INT_PUB dependencies on OKC_API
12.2.2