Search Results get_status_flag




Overview

The APPS.CS_SR_CHILD_AUDIT_PKG package body provides the audit-trail and status-resolution logic used by Oracle Service (Service Request) child entities. Its principal purpose is to serve as the subscriber logic for business events published by Service Request child objects. When a child record is created, updated, or deleted, the Workflow Business Events system invokes this package to capture audit information tied to the parent Service Request. The package header comment identifies four child entities in scope: SR Tasks, SR Notes, SR Solution Links, and SR Task Assignments. The package is classified as a custom or "OTHER" API in ETRM, and it is referenced by four other packages, indicating it acts as a shared utility rather than an entry-point API. The header revision $Header: cssraudb.pls 120.5.12010000.3 confirms the file is part of the EBS 12.1.1 code line and remains present in 12.2.2.

Key Procedures and Functions

ETRM documents two procedures/functions for this package body:

  • GET_STATUS_FLAG — A helper function, introduced per the source comment "Added for status update" (dated 10/16/03), that accepts a Service Request incident status identifier and returns a status flag as a VARCHAR2. It is the object most frequently targeted by searches for "get_status_flag," and is used internally to determine the status classification of an incident when recording child-entity audit rows.
  • CS_SR_AUDIT_CHILDENTITIES — The primary event subscription function. It receives a subscription GUID and an in/out WF_EVENT_T payload, extracts the event name and entity identifiers, and dispatches to the appropriate cursor logic based on the child entity type. The body declares local variables for the event key, entity code, entity id, update date, activity code, source object type/id, incident id, user id, and audit id, along with standard return status, message count, and message data variables. Internal cursors (get_Task_Dtls, get_TaskAssign_dtls, get_Note_Dtls) retrieve the detail rows needed to build the audit record. No parameter lists are invented here; the documented signature is limited to the subscription GUID and Workflow event parameter.

Tables Accessed

The package reads and writes the following objects, exposed to APPS through synonyms:

  • WF_EVENT_T — The Workflow event type instantiated as the inbound/outbound event parameter; the function calls getEventName() against it.
  • CS_INCIDENTS_ALL_B and CS_INCIDENTS_ALL_TL — The base and translation tables for Service Requests, used to resolve the incident (SR) that owns the child entity being audited.
  • CS_INCIDENT_STATUSES_B — The incident status lookup, read by GET_STATUS_FLAG to translate a status id into a status flag.
  • JTF_TASK_ALL_ASSIGNMENTS — The task assignment table, joined in the get_TaskAssign_dtls cursor to capture assignee role and update information for task assignment audit rows.

Usage Notes

This package is not ordinarily invoked directly by end users. It is registered as the subscription function for update, create, and delete events raised by SR Tasks, SR Notes, SR Solution Links, and SR Task Assignments. The Workflow Business Events framework therefore calls CS_SR_AUDIT_CHILDENTITIES automatically when those events fire. Because the package is referenced by four other packages, it is also invoked programmatically from SR-related PL/SQL that needs the same child-entity audit or status-flag resolution. In Oracle EBS 12.1.1 and 12.2.2, the logic is unchanged; the 120.5.12010000.3 header confirms it has not been recompiled since 2008. Customizations that raise new child-entity events should either extend this package or register an additional subscription that calls GET_STATUS_FLAG for consistent status classification. Direct calls should supply a valid subscription GUID and a properly initialized WF_EVENT_T; callers must check the returned status and message data variables for error handling, since the function returns a VARCHAR2 result code rather than raising exceptions.