Search Results wf_debug




Overview

APPS.PN_AM_WF is the Oracle Property Manager workflow integration package body for the Oracle E-Business Suite Release 12.1.1 and 12.2.2 environments. Its principal business function is to bridge Property Manager lease and approval transactions with the Oracle Workflow and Oracle Approvals Management (AME) engines, allowing lease records to participate in approval routings, status transitions, and business event publication. The package encapsulates the logic that determines who must approve a lease, how approval status is recorded, and how the system reacts when a workflow process completes or aborts. Because Property Manager leases can be created, modified, or submitted for approval from multiple entry points, PN_AM_WF centralizes the workflow-facing operations so that Forms, concurrent programs, and custom extensions all invoke the same controlled interfaces. The package also provides a diagnostic helper, WF_DEBUG, which writes trace information using the PN_DEBUG_MODE profile option, matching the common EBS convention of gating diagnostics on a site-level profile value.

Key Procedures and Functions

The documented interface consists of ten procedures and functions:

  • RAISE_BUSINESS_EVENT — Generic routine that publishes a Property Manager business event through WF_EVENT.RAISE. It generates an event key from the PN_WF_ITEM_S sequence, appends input parameters (transaction, lease, and old/new lease status values) to the workflow parameter list, and conditionally passes the current operating unit identifier when the lease status event is raised, preserving Multi-Org Access Control context.
  • GET_APPROVER — Resolves the approver for a lease transaction, typically by consulting AME through the AME calling applications configuration.
  • UPDATE_STATUS — Updates the approval or lease status on the underlying lease record.
  • CALL_LEASE_APPROVAL_WF — Initiates the lease approval workflow process for a submitted lease.
  • SET_APPROVAL_STATUS — Sets the approval status attribute on the lease, usually following an approver decision.
  • SET_STATUS_ON_EXIT — Handles status assignment when a workflow activity or process exits, ensuring the lease reflects the workflow outcome.
  • GET_NOTIFICATION_AGENT — Returns the notification agent, that is, the identity under which workflow notifications are sent to approvers.
  • VALIDATE_LEASE_REQUEST — Validates that a lease request is eligible for approval before workflow submission.
  • WF_DEBUG — Diagnostic procedure that emits debug messages when the PN_DEBUG_MODE profile option is enabled; it is the object matched by the search term "wf_debug".
  • SUBMIT_PROGRAM — Submits a concurrent program request, allowing workflow-driven processing to launch batch jobs.

Tables Accessed

The package reads and writes several core tables through APPS synonyms. PN_LEASES_ALL is the primary lease repository, supplying lease identifiers and status values. PN_LEASE_DETAILS_ALL stores lease detail attributes used during validation and status maintenance. PN_WF_ITEM_S is the sequence source for unique workflow event keys. AME_CALLING_APPS identifies the calling application registration used by AME when determining approvers, while AME_TEMP_OLD_APPROVER_LISTS supports prior approver list retrieval. FND_APPLICATION and FND_USER provide application and user reference data, including notification agent resolution. DUAL is used for sequence and utility queries, and PLITBLM is the standard PL/SQL table type used in list handling. WF_PARAMETER_LIST_T is the workflow parameter list type populated when events are raised.

Usage Notes

PN_AM_WF is typically invoked indirectly rather than directly by end users. Property Manager Forms call it when a lease is submitted for approval, when approver information is displayed, and when status changes must be propagated. Workflow itself re-enters the package through status-on-exit handling and business event raising, and concurrent program submission may be triggered from workflow activities. Custom code integrating with Property Manager approvals should use these documented procedures rather than inserting into the underlying tables, since the package enforces approval validation, MOAC context, and proper Workflow/AME registration. Administrators troubleshooting approval routing can enable the PN_DEBUG_MODE profile option to activate WF_DEBUG output and trace event keys, approver resolution, and status transitions during testing.