Search Results prebuild_wf_plsql




Overview

OKC_WF is a technical PL/SQL package in the APPS schema that supports the Oracle Contracts (OKC) module's integration with Oracle Workflow. Its principal business function is to construct, format, store, and execute the parameter strings that Oracle Workflow requires when a contract-related business event launches a workflow process. Rather than requiring callers to hand-assemble the Workflow attribute syntax, OKC_WF exposes a small API that builds a formatted string from an outcome name and an outcome parameter table, and then converts that string into an executable PL/SQL call. This allows contract lifecycle events — such as approval outcomes, status transitions, or user-defined process outcomes — to pass structured parameters directly into Workflow without bespoke string handling in each calling program. The package is declared with authid current_user, meaning it executes with the privileges of the invoking user rather than the definer, an important consideration for any code that calls it from a custom schema.

Key Procedures and Functions

The documented API comprises thirteen callable elements organized around a build-and-execute pipeline. The build side includes INIT_WF_STRING, which clears the internal string buffer, and BUILD_WF_STRING, a function that returns a fully formatted Workflow parameter string derived from an outcome name and an outcome parameter table. For callers who prefer finer control, INIT_WF_HEADER sets the outcome-name header and APPEND_WF_STRING adds individual parameters in a loop; only DATE, CHAR, and NUMBER data types are honored, and all others are skipped. GET_WF_STRING returns the currently accumulated string.

The remaining documented members support typed extraction and execution. NVALUE, DVALUE, and CVALUE retrieve numeric, date, and character values respectively from the parameter payload. PREBUILD_WF_PLSQL and BUILD_WF_PLSQL assemble the PL/SQL invocation from the formatted string, with PREBUILD handling preparation and BUILD producing the final callable form. EXEC_WF_PLSQL is the terminal procedure that actually runs the generated PL/SQL, and is the member most directly associated with the search term "exec_wf_plsql". Together these routines let OKC deliver contract outcome parameters to Workflow in the exact syntax it expects, for example a header such as a qualified outcome name followed by numbered attribute definitions carrying type, name, length, and value.

Tables Accessed

The only documented table reference is PLITBLM, reached through an APPS synonym. In Oracle EBS, PLITBLM is a standard Workflow/PL/SQL infrastructure table used in conjunction with DBMS_SQL and the Workflow PL/SQL APIs. OKC_WF's dependency on it is consistent with the package's role of preparing and executing dynamically constructed PL/SQL statements on behalf of Workflow.

Usage Notes

OKC_WF is an internal technical utility rather than an end-user-facing component. It is typically invoked from contract workflow event handlers and outcome processing logic within the OKC module, and it is referenced by two other packages in the documented metadata, confirming its role as a shared service. It is not normally called from a form or a standalone concurrent program; instead it executes indirectly when contract business events fire workflow processes. Customizations that need to emulate standard OKC workflow behavior — for example, raising a contract outcome with parameters into a workflow process — should call the same documented sequence: clear the string, build or append parameters, and then execute the result via the WORKFLOW call. Because the package runs under current_user privileges, custom callers must ensure they hold the necessary execute grants and that any dynamically generated PL/SQL resolves in their own schema context.