Search Results requisition_approval




Overview

APPS.CS_CONTRACTS_WFA is a workflow activity package body within the Oracle E-Business Suite Service Contracts (CS) module. Its name and structure identify it as the Workflow Activity (WFA) handler for the contract item type, meaning it supplies the PL/SQL callback procedures that the Oracle Workflow engine invokes at defined points in the contract approval process. In EBS 12.1.1 and 12.2.2, Service Contracts uses Oracle Workflow to route contract documents through configurable approval chains, and each activity within those chains maps to a function or procedure in this package. The procedures implement the standard Workflow activity signature, accepting the item type, item key, activity identifier, function mode, and a result value, and they return control to the Workflow engine after performing the requested operation.

The package is classified as OTHER in the ETRM metadata, indicating it is not exposed as a public API for external integration but rather serves an internal orchestration role. Its logic drives status transitions on contract records and coordinates with the Service Contracts public APIs to persist changes and generate audit information.

Key Procedures and Functions

  • SELECTOR — Evaluates the current activity context and returns the name of the process or activity that Workflow should run next. In this package the selector returns the REQUISITION_APPROVAL process, directing the workflow to the appropriate downstream step.
  • INITIALIZE_REQUEST — Performs the setup work required when an approval request is first launched, establishing the runtime context that subsequent activities in the workflow depend upon.
  • SELECT_APPROVER — Determines the approver or approval routing for the contract, allowing the workflow to resolve the correct participant based on the documented approval rules.
  • APPROVE_CONTRACT — Executes the approval action. It decodes the workflow item key into the underlying contract and workflow process identifiers, validates the result, and invokes the Service Contracts update API to advance the contract status. Errors are recorded through the Workflow context mechanism and raised as API errors for the engine to handle.
  • REJECT_CONTRACT — Executes the rejection action, the complement to approval. This is the procedure most commonly located when searching for "reject_contract," and it updates the contract to a rejected status and returns the corresponding result to the Workflow engine. As with approval, the item key is decoded to the contract and process identifiers before the status change is applied.
  • INITIALIZE_ERRORS — Establishes error-handling state for the activity package, ensuring that failures encountered during approval or rejection processing are captured and surfaced consistently.

Tables Accessed

The package operates against CS_CONTRACTS_ALL, referenced through an APPS synonym. This table holds the contract header records, including status, contract identifiers, and object version numbers. Reading and writing here is essential: the approval and rejection procedures must resolve the contract identified by the workflow item key and then update its status column to reflect the approval or rejection outcome, using the object version number for optimistic concurrency control.

Usage Notes

CS_CONTRACTS_WFA is invoked by the Oracle Workflow engine rather than called directly by end users. It executes when a contract enters the Service Contracts approval workflow, with the Workflow runtime supplying the item type, item key, activity identifier, and function mode. The "RUN" function mode triggers the actual business action; other modes permit the engine to query or test activity definitions.

Because the package is classified as OTHER and is referenced by zero other packages, it should be treated as internal infrastructure. Customizations that need to approve or reject contracts should call the Service Contracts public APIs instead of this package. Modifying its logic directly risks breaking the standard approval workflow and is not supported.