Search Results mandatory_associations_exists




Overview

APPS.OTA_EVT_BUS2 is a public PL/SQL package body belonging to the Oracle E-Business Suite (EBS) Training and Event Management (OTRM) module. It encapsulates the core business rules that govern event (course offering) lifecycle operations: locking events for concurrent editing, evaluating delegate capacity and placement, arbitrating resource and finance line dependencies, and enforcing mandatory associations between an event and its required corporate entities. In Oracle EBS 12.1.1 and 12.2.2 the package is classified as an OTHER API within the ETRM family, meaning it is intended primarily for internal consumption by the Event Management forms, concurrent programs, and dependent ETRM packages rather than as a freely callable public interface. Its procedures are invoked when a user creates, modifies, books against, or closes an event, and it centralizes logic that would otherwise be duplicated across the Event Management UI and batch processing. The private global g_package is used to prefix HR_UTILITY.SET_LOCATION diagnostics, providing a consistent debug trace across all entry points. Ten packaged subprograms are documented, and the package is referenced by ten other EBS packages, confirming its role as a low-level service layer within the ETRM business object stack.

Key Procedures and Functions

  • LOCK_EVENT — Obtains a pessimistic lock on a given event row by reading its OBJECT_VERSION_NUMBER from OTA_EVENTS and delegating to OTA_EVT_SHD.LCK, preventing concurrent modification.
  • GET_TOTAL_PLACES — Returns the total number of placed delegates for an event, optionally filtered to all or internal placements.
  • CHECK_PLACES — Validates delegate placement against available capacity, typically called before confirming a booking.
  • RESET_EVENT_STATUS — Restores or recalculates the status of an event following a change in its bookings, associations, or lines.
  • RESOURCE_BOOKING_EXISTS — Determines whether resource bookings are attached to the event, guarding deletion and status changes.
  • FINANCE_LINE_EXISTS — Determines whether finance lines exist for the event, similarly guarding event maintenance operations.
  • GET_VACANCIES — Returns the remaining available places on an event after accounting for existing bookings.
  • WAIT_LIST_REQUIRED — Indicates whether a prospective delegate should be placed on a wait list because capacity is exhausted.
  • CHECK_MANDATORY_ASSOCIATIONS — Enforces that all associations flagged as mandatory for the event have been defined.
  • MANDATORY_ASSOCIATIONS_EXISTS — A boolean-style predicate reporting whether any mandatory associations exist for an event; this is the object returned when users search on "mandatory_associations_exists".

Tables Accessed

The package reads and writes only through APPS synonyms. OTA_EVENTS supplies the event header row and its OBJECT_VERSION_NUMBER for locking. OTA_DELEGATE_BOOKINGS and OTA_BOOKING_STATUS_TYPES are joined to compute total places, vacancies, and wait-list decisions, with status types determining which bookings are counted as active. OTA_EVENT_ASSOCIATIONS holds the associations evaluated by CHECK_MANDATORY_ASSOCIATIONS and MANDATORY_ASSOCIATIONS_EXISTS. OTA_RESOURCE_BOOKINGS and OTA_FINANCE_LINES back the existence checks that protect an event from being changed or deleted while downstream allocations remain.

Usage Notes

OTA_EVT_BUS2 is ordinarily invoked indirectly. The Event Management forms call LOCK_EVENT when a user enters edit mode and call the capacity, wait-list, and association checks during booking and save validation. Concurrent programs and the ten referencing EBS packages call the existence and reset routines during event maintenance, cancellation, and cleanup. Custom extensions should call the packaged procedures rather than querying OTA_EVENTS, OTA_DELEGATE_BOOKINGS, or OTA_EVENT_ASSOCIATIONS directly, because the packaged logic embeds the mandatory-association and status rules that keep ETRM data consistent. Debug output is emitted through HR_UTILITY.SET_LOCATION whenever the FND debug profile is enabled.