Search Results approve_activity_status
Overview
APPS.AMS_APPROVAL_PVT is a private PL/SQL package body within the Oracle E-Business Suite Advanced Marketing (AMS) module, responsible for driving the approval workflow logic associated with marketing activities and offers. Its header comment (amsvappb.pls, version 120.7.12020000.2, last shipped 2013/02/21) confirms it belongs to the R12 code line and remains current through EBS 12.1.1 and 12.2.2. The package encapsulates the server-side business rules that determine whether a marketing activity or offer requires approval, identify the appropriate approver, route the document through the Oracle Workflow engine, and update the approval status of the underlying activity or budget line once a decision is rendered.
The package defines the global constant G_ITEMTYPE as 'AMSAPRV', which is the Workflow item type under which approval processes are instantiated. A private set_org_ctx routine invokes MO_GLOBAL.init('OZF') and MO_GLOBAL.set_policy_context to establish the multi-org (Operating Unit) security context before any query of offer or budget data — a mandatory R12 enhancement that ensures the correct organization's data is visible. A find_org_id helper resolves the owning organization of an offer by reading QP_LIST_HEADERS_ALL_B for the supplied list header ID.
Key Procedures and Functions
The package exposes thirty-four documented procedures and functions. The principal entry points include:
- STARTPROCESS / START_LINEAPPROVAL / START_LINE_APPROVAL — initiate the approval flow for a whole activity or for an individual budget line, creating the Workflow process and setting initial approver assignments.
- APPROVE_ACTIVITY_STATUS / REJECT_ACTIVITY_STATUS — record the outcome of an approver's decision at the activity level, updating the stored approval status and triggering downstream notifications or the next routing step.
- APPROVE_BUDGET_LINE / REJECT_BUDGET_LINE — apply the same approve/reject semantics to individual budget lines within a marketing activity.
- CHECK_LINE_APPROVER_DETAILS, GET_LINE_APPROVER_DETAILS, CHECK_LINE_FURTHER_APPROVAL, CHECK_LINE_APPROVAL_RULE, CHECK_MORE_LINES_REMAINING, CHECK_BUDGET_LINES, CHECK_APPROVAL_RULES — validation and rule-evaluation routines that determine the next approver, whether additional lines remain, and whether the flow may advance.
- IS_PARENT_WAITING, CAN_CONTINUE_FLOW, CONTINUE_PARENT_PROCESS — orchestration routines that manage parent/child process coordination in the Workflow.
- SET_ACTIVITY_DETAILS, SET_APPROVER_DETAILS, PREPARE_DOC — populate the document attributes and approver information used by the Workflow notification.
- REVERT_STATUS — rolls back the approval status when a process is withdrawn or cancelled.
- HANDLE_ERR (private) — retrieves diagnostic messages from
FND_MSG_PUBand composes the outgoing error text.
Tables Accessed
The package reads and writes a defined set of application tables via APPS synonyms. AMS_APPROVAL_DETAILS stores the per-document approval history and status; AMS_APPROVERS holds approver assignments; AMS_OBJECT_RULES_B supplies the approval rule definitions. Offer and budget data is read from OZF_OFFERS, OZF_ACT_BUDGETS, and QP_LIST_HEADERS_ALL_B. User and responsibility references are resolved through FND_USER, FND_FORM_FUNCTIONS, JTF_RS_ROLES_B, and JTF_RS_ROLE_RELATIONS. Oracle Workflow routing is configured through WF_ROUTING_RULES and WF_ROUTING_RULE_ATTRIBUTES, while DUAL is used for context initialization.
Usage Notes
AMS_APPROVAL_PVT is an internal (PVT) package — it is not intended to be called directly by end users or custom code. It is invoked by the AMS approval Workflow processes (item type AMSAPRV) and by the AMS marketing forms that submit activities and offers for approval, as well as by concurrent processes that re-evaluate pending approvals. The package is referenced by eight other packages within the AMS schema, indicating it is a foundational component of the approval framework. Because it performs Operating Unit context setup through MO_GLOBAL, any external invocation must ensure the correct org_id is available; failure to do so will return incorrect or no data. Callers are also expected to be aware that APPROVE_ACTIVITY_STATUS and its counterparts commit status changes that are visible immediately to the Workflow engine.
-
APPS.AMS_APPROVAL_PVT dependencies on FND_LOG
12.2.2
-
APPS.AMS_APPROVAL_PVT dependencies on OZF_DEBUG_PVT
12.2.2
-
APPS.AMS_APPROVAL_PVT dependencies on OZF_UTILITY_PVT
12.2.2
-
PACKAGE BODY: APPS.AMS_APPROVAL_PVT
12.2.2
-
PACKAGE: APPS.AMS_APPROVAL_PVT
12.1.1
-
APPS.AMS_APPROVAL_PVT dependencies on AMS_APPROVAL_PVT
12.2.2
-
PACKAGE: APPS.AMS_APPROVAL_PVT
12.2.2
-
APPS.AMS_APPROVAL_PVT dependencies on FND_GLOBAL
12.2.2
-
APPS.AMS_APPROVAL_PVT dependencies on WF_CORE
12.2.2
-
APPS.AMS_APPROVAL_PVT dependencies on WF_CORE
12.1.1
-
PACKAGE BODY: APPS.AMS_APPROVAL_PVT
12.1.1
-
APPS.AMS_APPROVAL_PVT dependencies on AMS_APPROVAL_PVT
12.1.1
-
APPS.AMS_APPROVAL_PVT dependencies on WF_ENGINE
12.2.2