Search Results pa_task_workflow_pkg




Overview

PA_TASK_WORKFLOW_PKG is an Oracle Projects PL/SQL package owned by APPS and declared with AUTHID CURRENT_USER. Its business purpose is to manage the workflow lifecycle of project tasks and task approval notifications within Oracle E-Business Suite. The package coordinates task-level approval routing, status transitions, and notification generation for project structures maintained in Oracle Projects. It operates against the project/task hierarchy and integrates with Oracle Workflow and Oracle Alert-style messaging through the FND messaging infrastructure.

The package declares two PL/SQL collection types, g_deltask_rec (a record capturing project_id, task_id, elem_ver_id, rec_ver_num, and parent_struc_ver) and g_taskrec_tbl (an index-by table of that record), along with the package-level variable g_del_taskrec. These structures support batch tracking of task versions eligible for deletion — directly relevant to the delete_task_version search context, since the DELETE_TASK procedure relies on the same project/task/version identifiers.

The package also declares two explicit cursors: c_proj_info, which retrieves project number, name, dates, type, organization, and status from PA_PROJECTS_ALL; and c_task_info, which joins PA_PROJ_ELEMENTS, PA_PROJ_ELEMENT_VERSIONS, PA_PROJ_ELEM_VER_SCHEDULE, PA_OBJECT_RELATIONSHIPS and PA_PROJECTS_ALL to resolve task attributes, parent task details, WBS level, scheduled dates, and approver information. The header identifies the source file as PATSKWFS.pls and shows link_task_flag = 'Y' and type_id = 1 filters, confirming the package operates on linked project tasks.

Key Procedures and Functions

The documented API surface contains thirteen procedures and functions:

  • START_TASK_APRV_WF — initiates the task approval workflow for a given task.
  • IS_CHILD_TASK — determines whether a task occupies a child position in the task hierarchy.
  • IS_PARENT_TASK_APPROVED — evaluates whether a parent task has already been approved, gating downstream approval logic.
  • APPEND_VARCHAR_TO_CLOB — utility to append VARCHAR2 content onto a CLOB, used when assembling notification bodies.
  • SHOW_TASK_NOTIFY_PREVIEW — renders a preview of the task approval notification.
  • GENERATE_TASK_APRV_NOTIFY — creates the task approval notification message.
  • POST_TASK — posts a task, applying the workflow-related state changes.
  • UPDATE_TASK_STATUS — updates the status of a task, validating transitions.
  • DELETE_TASK — deletes a task (and its associated version context), the procedure most closely associated with the user's delete_task_version search.
  • SHOW_ERROR — surfaces error messaging to the caller or UI.
  • VERIFY_TASK_STATUS — validates that a task is in an appropriate status before an operation proceeds.
  • MARK_CO_STATUS — marks the status of a related control item or change order context.
  • IS_LAST_TASK — determines whether a task is the last remaining task within its structure.

Tables Accessed

The package reads and writes through APPS synonyms:

  • PA_PROJECTS_ALL — project header data used by c_proj_info and c_task_info.
  • PA_PROJ_ELEMENTS — task/project element definitions and parent linkages.
  • PA_PROJ_ELEMENT_VERSIONS — versioned task records, including WBS level and parent structure version.
  • PA_PROJ_ELEM_VER_SCHEDULE — scheduled start and finish dates for task versions.
  • PA_OBJECT_RELATIONSHIPS — relationship mapping between tasks and related objects.
  • PA_TASKS — task master data maintained by the task workflow logic.
  • PA_RESOURCE_ASSIGNMENTS — resource assignments tied to tasks.
  • PA_BUDGET_VERSIONS, PA_CONTROL_ITEMS, PA_CI_ACTIONS — control-item and budget context for status changes.
  • PA_PAGE_CONTENTS, PA_WF_PROCESSES, PA_WORKFLOW_ITEMKEY_S — workflow process and item key tracking.
  • FND_USER, FND_NEW_MESSAGES — approver resolution and notification delivery.

Usage Notes

PA_TASK_WORKFLOW_PKG is typically invoked from Oracle Projects task management forms and from workflow background processes when a task enters an approval cycle. START_TASK_APRV_WF and GENERATE_TASK_APRV_NOTIFY drive workflow initiation and messaging; IS_CHILD_TASK and IS_PARENT_TASK_APPROVED enforce hierarchical approval rules; UPDATE_TASK_STATUS, POST_TASK, and DELETE_TASK perform state transitions. The package is referenced by one other package, indicating internal dependency within Oracle Projects. Custom code invoking DELETE_TASK should supply valid project, task, and version identifiers consistent with the g_deltask_rec structure.