Search Results validate_trigger




Overview

AMS_TRIG_PVT is a private PL/SQL API in the Oracle E-Business Suite Advanced Marketing (AMS) module, declared with AUTHID CURRENT_USER and owned by APPS. It provides the internal implementation layer for managing trigger records, which represent the scheduled or event-driven execution definitions used throughout Oracle Marketing. Triggers are the mechanism by which campaigns, campaign schedules, and related marketing activities are initiated at defined points in time or in response to system events. This package encapsulates the data manipulation and validation logic behind the public trigger APIs, shielding callers from the physical structure of the AMS trigger schema.

The package is classified as PVT (private), meaning it is not intended for direct invocation by external or customer-developed code. It declares the PL/SQL record and table types used to represent trigger rows, including fields for trigger identity, audit columns, timezone handling, and the various user-facing and normalized date/time attributes maintained by the timezone support added in 2000. Its header history spans 1999 through 2001, reflecting the evolution of the trigger data model, including the introduction of the translation table and the removal of security group identifiers.

Key Procedures and Functions

The documented API surface consists of ten procedures:

  • CREATE_TRIGGER — Inserts a new trigger definition, populating the base, translation, and secure tables required for a complete trigger record.
  • UPDATE_TRIGGER — Modifies an existing trigger definition and its dependent rows.
  • DELETE_TRIGGER — Removes a trigger and its associated child records.
  • LOCK_TRIGGER — Obtains a lock on the trigger record to support concurrency control during multi-step operations.
  • VALIDATE_TRIGGER — Performs validation of the trigger record, applying required-field, referential, and business-rule checks before persistence. This is the procedure associated with the search term "validate_trigger."
  • CHECK_TRIG_ITEMS — Verifies the individual items or attributes that make up a trigger definition.
  • CHECK_TRIG_RECORD — Validates the trigger PL/SQL record structure as a whole prior to processing.
  • CHECK_TRIG_REQ_ITEMS — Enforces that all mandatory trigger items have been supplied.
  • INIT_TRIG_REC — Initializes a trigger record with default values to prepare it for population by the caller.
  • COMPLETE_TRIG_REC — Finalizes a trigger record, filling in derived or system-maintained attributes before it is written.

These routines follow the standard Oracle EBS private API pattern of paired initialize/validate/complete operations around create, update, and delete actions.

Tables Accessed

The package operates against the following objects through APPS synonyms:

  • AMS_TRIGGERS — The primary table holding trigger definitions.
  • AMS_TRIGGERS_S — The secure (organization/security) shadow table that mirrors the base trigger rows.
  • AMS_TRIGGERS_TL — The translation table storing language-specific trigger text, introduced when triggers gained a TL table in 2001.
  • AMS_TRIGGER_ACTIONS — Child rows describing the actions a trigger performs when fired.
  • AMS_TRIGGER_CHECKS — Child rows describing the conditions or checks associated with a trigger.
  • AMS_CAMPAIGN_SCHEDULES_B — The campaign schedule base table, providing the relationship between triggers and campaign scheduling.
  • FND_LANGUAGES — Used to resolve installed and active languages for translation handling.
  • DUAL — Used for single-row queries and value derivation.

Usage Notes

Because AMS_TRIG_PVT is a private package, it is normally invoked indirectly through the public AMS trigger APIs, the Marketing responsibility forms, or concurrent programs that process campaign and trigger scheduling. The VALIDATE_TRIGGER procedure is called during the save cycle of trigger maintenance forms and by programmatic insert or update flows to ensure data integrity before commit.

The package is referenced by four other packages, indicating that sibling APIs within the AMS trigger framework depend on its validation and record-management routines. Custom development should not call AMS_TRIG_PVT directly; instead, the corresponding public API should be used, as the private package signature is subject to change between releases and patches.