Search Results wf_started




Overview

WSH_WF is a shipping-execution workflow integration package within the Oracle E-Business Suite (EBS) 12.1.1 and 12.2.2 releases. Its principal business function is to initiate and manage Oracle Workflow processes that notify customers and internal parties about the status of outbound shipments and backordered lines. The package encapsulates the logic required to launch the shipping notification workflow (item type and process both default to WSHNOTIF), to query shipment and order status information, and to check the state of running workflow item instances.

The package body declares two PL/SQL collection types — wfRecTyp and wfRecTabTyp — used to track workflow initiation attempts in a package-level associative array (g_wf_table). The wfRecTyp record includes fields for source_header_id, source_code, contact_type, contact_id, and a Boolean flag named wf_started. This flag is directly relevant to the "wf_started" search term: it records whether a workflow has already been started for a given combination of source document and contact, allowing the package to avoid duplicate workflow instantiations.

Key Procedures and Functions

The package exposes nine documented program units. START_PROCESS is the primary entry point. It accepts identifiers for the source header, source code, order number, contact details (type, name, and ID), counts of shipped and backordered lines, and notification dates, along with optional overrides for the workflow process and item type. The default workflow process and item type resolve to WSHNOTIF via NVL, and the item key is constructed by concatenating the source header ID, source code, and contact name.

  • START_PROCESS — Initializes debugging, assembles the workflow item key and user key, and launches the notification workflow.
  • ORDER_STATUS — Returns status information for an order, typically used to determine which notification branch to follow.
  • SHIPPED_LINES — Provides the set of lines that have shipped, feeding the delivered-lines portion of the notification.
  • BACKORDERED_LINES — Provides lines that remain on backorder, driving the backorder portion of the notification or a separate backorder notification.
  • ORDER_FULFILLED — Evaluates whether an order has been fully fulfilled, useful as a workflow completion or branching condition.
  • UPDATE_WORKFLOW — Updates or synchronizes workflow-related status information.
  • CHECK_ITEM_INSTANCE — Verifies whether a workflow item instance already exists, supporting the duplicate-prevention behavior associated with the wf_started flag.
  • START_WORKFLOW — Performs the actual Oracle Workflow API invocation.
  • GET_WF_USER — Resolves the workflow user (role or recipient) to whom notifications should be delivered.

The package also relies on WSH_DEBUG_INTERFACE and WSH_DEBUG_SV for diagnostic logging, invoked when debugging is enabled via WSH_DEBUG_SV.is_debug_enabled or the global g_debug flag.

Tables Accessed

WSH_WF reads and writes through APPS synonyms. Customer and contact information is sourced from HZ_CUST_ACCOUNTS, HZ_CUST_ACCOUNT_ROLES, HZ_ORG_CONTACTS, and HZ_RELATIONSHIPS, which together resolve the appropriate notification recipients and their roles. Item and shipment context is drawn from MTL_SYSTEM_ITEMS, WSH_DELIVERY_DETAILS, and WSH_NEW_DELIVERIES, supporting the shipped-line and backordered-line logic. Workflow state is read from WF_ITEM_ACTIVITY_STATUSES to determine whether an item instance is active or already completed. The package also references PLITBLM, an internal temporary table used by the PL/SQL item-type infrastructure. These tables collectively support recipient resolution, shipment status evaluation, and workflow instance verification.

Usage Notes

WSH_WF is typically invoked from shipping execution forms and concurrent programs when a shipment is confirmed and a shipping notification or backorder notification must be dispatched. The default process and item type of WSHNOTIF indicate that it is the standard notification vehicle for outbound logistics. Custom code can call START_PROCESS directly, supplying the source header, source code, contact, and line counts, while CHECK_ITEM_INSTANCE should be consulted beforehand to prevent duplicate notifications. One other package references WSH_WF, reinforcing its role as a shared integration point. Debugging can be enabled through the WSH debug infrastructure, with log entries recording each input parameter when active.