Search Results cs_sr_child_audit_pkg




Overview

The CS_SR_CHILD_AUDIT_PKG package is a service request (SR) auditing utility within the Oracle E-Business Suite Service (CS) module. Its principal business function is to maintain a reliable audit trail for child entities attached to a Service Request, ensuring that changes made to these subordinate records are captured for historical and compliance purposes. As defined in the package header, the package provides the mechanism through which create, update, and delete events published by SR child entities are routed into the SR audit table. The child entities explicitly identified in the package comments are SR Tasks, SR Notes, SR Solution Links, and SR Task Assignments. By centralizing this logic, the package guarantees a consistent audit record regardless of the channel through which the SR child entity is modified.

The package is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking user rather than the owner, which is a standard convention for packages that must respect the calling session's security context. The header identifies the source revision (cssrauds.pls 120.1), confirming its presence in both Oracle EBS 12.1.1 and 12.2.2 environments.

Key Procedures and Functions

The ETRM metadata documents two callable program units within the package:

  • CS_SR_Audit_ChildEntities — A function that serves as the custom subscription handler for business events published by SR child entities. Its purpose is to receive the subscription identifier and the workflow event payload, then process that event so that an appropriate audit record is generated. It returns a VARCHAR2 status value indicating the outcome of handling the event. This function is the entry point invoked by the Workflow Business Event System when the update, create, or delete subscriptions for SR Tasks, SR Notes, SR Solution Links, and SR Task Assignments fire.
  • CS_SR_AUDIT_CHILD — A procedure responsible for creating an audit record in the SR audit table whenever an SR or SR child entity is updated. It accepts the incident identifier, the code and identifier of the updated entity, the update date and activity code, and a series of optional parameters that capture before-and-after values for status, closed date, owner, owner group, resource type, owner status update flag, update program code, user, and previously recorded responded-by and resolved dates. It returns the generated audit identifier along with the standard x_return_status, x_msg_count, and x_msg_data outputs used throughout Oracle EBS APIs for error propagation.

Tables Accessed

The package operates against several core Service Request tables and supporting structures, referenced through APPS synonyms:

  • WF_EVENT_T — The Workflow event payload type passed into the event handler function, carrying the details of the child entity change that must be audited.
  • CS_INCIDENTS_ALL_B — The base Service Request (incident) table, accessed to validate and resolve the parent incident associated with the child entity being audited.
  • CS_INCIDENTS_ALL_TL — The translation table for incidents, used where descriptive incident information is required.
  • CS_INCIDENT_STATUSES_B — The incident status table, referenced to resolve and record status and prior-status values captured during auditing.
  • JTF_TASK_ALL_ASSIGNMENTS — The task assignment table, relevant because SR Task Assignments are among the child entities whose changes are audited.

Usage Notes

CS_SR_CHILD_AUDIT_PKG is not typically invoked directly by end users. Its primary invocation path is through the Oracle Workflow Business Event System: the CS_SR_Audit_ChildEntities function is registered as the custom rule function on subscriptions to the create, update, and delete events raised by SR child entities. When those events fire, Workflow calls the function, which in turn invokes CS_SR_AUDIT_CHILD to persist the audit record.

Because the package is referenced by four other packages, it also forms part of the internal call graph of the Service module. Extension developers implementing custom child-entity auditing can call CS_SR_AUDIT_CHILD directly to write audit rows, observing the standard x_return_status / x_msg_count / x_msg_data error-handling convention. Any such call should be made within a transaction that preserves the parent incident context, and callers must handle a return status of 'E' or 'U' appropriately.