Search Results create_attachment




Overview

OKE_MILPAC_INTG_WF is an Oracle Engineering (OKE) PL/SQL package owned by the APPS schema that acts as the integration bridge between Oracle Project Contracts and Oracle Workflow. Its name reflects its dual role: "MILPAC" denotes the milestone and progress payment functionality handled by the OKE module (OFA/Contracts), while "INTG_WF" indicates that the package supplies the integration logic invoked by the Workflow engine. In Oracle EBS 12.1.1 and 12.2.2 the package is defined with AUTHID CURRENT_USER, meaning its unqualified references to FND, HR, OKE and WSH objects resolve through the APPS synonyms in the calling schema's context, preserving the standard EBS security and synonym model.

The package is deliberately small — two documented entry points — because each procedure maps directly to a Workflow function activity. Workflow executes these activities as it routes a contract-related approval or notification process, allowing the deliverable and attachment context associated with a milestone or progress payment to be assembled and persisted without user intervention. Because the source header dates from 2002 and the object is marked "noship," it has been carried forward largely unchanged across releases and is invoked only where the relevant OKE/Workflow configuration is enabled.

Key Procedures and Functions

  • Initialize — The standard Workflow callback used to enter a function activity. It receives the Workflow item type, item key, activity ID and function mode, and returns a result code. Its role is to establish the runtime context for the subsequent activity and validate that the item type and key supplied by the Workflow engine correspond to a valid contract record.
  • Create_Attachment — The functional activity that materialises attachments against the contract or deliverable currently being processed by the workflow. It is the procedure most commonly associated with the "create_attachment" search term, since it is the API-level operation through which Workflow causes FND_ATTACHED_DOCUMENTS rows to be generated for the item.

Both procedures expose identical signatures: the four IN parameters (ItemType, ItemKey, ActID, FuncMode) plus a NOCOPY OUT ResultOut, in strict conformance with the Oracle Workflow PL/SQL function activity convention. No additional overloading or private helpers are documented.

Tables Accessed

  • FND_ATTACHED_DOCUMENTS and FND_ATTACHED_DOCUMENTS_S — the core Oracle Attachments tables and their sequence, written by Create_Attachment to register the new attachment records and obtain primary keys.
  • OKE_K_FORM_HEADERS — the contract form header table, providing the owning document context for the attachment being created.
  • WSH_DELIVERIES — shipping/delivery information, consulted when the contract workflow activity relates to a deliverable whose attachment context depends on delivery data.
  • HR_ALL_ORGANIZATION_UNITS_TL — supplies the organisation name used in attachment descriptions or notification text.

All access occurs through APPS synonyms, so no direct schema qualification is required.

Usage Notes

OKE_MILPAC_INTG_WF is not intended to be called directly from forms or concurrent programs. It is a Workflow-callback package: the standard usage pattern is to define a PL/SQL function activity in the contract workflow process, specifying OKE_MILPAC_INTG_WF.Create_Attachment (with Initialize as the entry/result function) and mapping the Workflow attributes ItemType, ItemKey, ActID and FuncMode into the corresponding parameters. The engine then invokes the procedure each time the process token reaches that activity.

Custom code should only call it when reproducing Workflow behaviour, and must supply a valid ResultOut buffer and a genuine Workflow item context, since the procedure expects the FND/OKE environment to be initialised. Because the referenced objects are APPS synonyms, the calling session must run under a responsibility with access to the OKE and Attachments functionality. No other packaged object in the EBS schemas references this package, confirming that its consumers are Workflow process definitions rather than other PL/SQL units.