Search Results task_alert




Overview

OKC_TASK_ALERT_ESCL_PVT is a private PL/SQL package body in the Oracle EBS Contracts (OKC) module. It implements the task alerting and escalation engine used by Oracle Contracts to notify task owners before contractual deliverables, obligations, or term milestones reach their due dates. The package also drives escalation logic when tasks remain incomplete past their deadlines, reassigning ownership to designated escalation owners according to rule definitions stored in the contract rules framework.

The package is classified as a PVT (private) API, meaning it is not published for direct external invocation. It is intended to be called internally by the Contracts workflow infrastructure. The "$Header" comment (OKCPALTB.pls 120.0, dated 2005/05/25) indicates a long-standing, stable object present in both 12.1.1 and 12.2.2 releases. The sole debug flag, l_debug, is populated from the profile option AFLOG_ENABLED, giving administrators control over diagnostic logging without code changes.

Key Procedures and Functions

The package exposes four documented procedures.

  • TASK_ALERT — The primary entry point. It sends notifications to all task owners before a task's due date is reached and updates the workflow process identifier in the tasks table to track the notification event.
  • TASK_ESCALATION1 — Handles the first escalation stage, typically notifying the immediate escalation owner defined on the governing rule when a task remains open past its due date.
  • TASK_ESCALATION2 — Handles the second escalation stage, notifying a higher-level escalation owner when the initial escalation does not resolve the overdue task.
  • OKC_PDATE_REACH_PVT — A supporting private procedure invoked when a planned date is reached, used to trigger downstream alert or escalation processing.

The body also contains a local helper, get_fnd_msg_stack, added for Bug 2477032. It iterates the FND message stack for debugging output and reinitializes the stack. This routine is relevant to the user's search for g_msg_data: the helper accepts a p_msg_data parameter and writes either the buffered FND messages or that raw message string to the concurrent log file when no stack entries exist — the pattern custom developers commonly replicate using a global g_msg_data variable.

Tables Accessed

The package reads and writes contract task and notification data through these APPS synonyms:

  • JTF_TASKS_B / JTF_TASKS_TL — Base and translated task records; the alert and escalation procedures read task definitions and update workflow identifiers.
  • OKC_RULES_B — Supplies escalation owner identifiers (rule_information6 and rule_information7) and the contract (dnz_chr_id) linked to a task timevalue.
  • OKC_RESOLVED_TIMEVALUES — Resolves the effective due dates used to determine when alerts and escalations fire.
  • JTF_TASK_STATUSES_TL / JTF_TASK_TYPES_TL — Provide descriptive status and type text for notification content.
  • FND_USER — Resolves user names and full names of task and escalation owners.
  • OKC_WF_NOTIFY_S1 — Workflow notification sequence used to issue alerts.
  • DUAL — Used for scalar lookups and PL/SQL evaluation.

Usage Notes

Because OKC_TASK_ALERT_ESCL_PVT is a private API and is referenced by zero other documented packages, it is normally invoked by the Contracts workflow background processes rather than from forms or concurrent programs directly. Administrators and developers typically encounter it when diagnosing task notification failures or escalation gaps, reviewing the concurrent manager log, or building custom alerting extensions. When extending it, developers should honor the FND message stack pattern demonstrated by get_fnd_msg_stack and the AFLOG_ENABLED profile gate rather than introducing ad hoc debug output.