Search Results create_stages




Overview

APPS.AHL_VWP_VISITS_STAGES_PVT is a private PL/SQL package that supports the Visit Work Package (VWP) planning functionality within Oracle E-Business Suite's Complex Maintenance, Repair and Overhaul (CMRO) module. It manages the STAGES tier of the Planning → Visit Work Package → Visits → Stages hierarchy, providing the transactional logic that creates, updates, copies, validates, and closes visit stages and their associated stage rules and stage-type associations.

The package is classified as PVT (private), meaning it is an internal implementation layer not intended for direct customer invocation. It was originally created in the 11.5.10 code line (header tag AHLVSTGS.pls, version 120.0) and remains available in both 12.1.1 and 12.2.2. Its declared cursor-level procedures include Process_Visit, Get_Visit_Details, Create_Visit, Copy_Visit, Update_Visit, Delete_Visit, UMP_Visit_Info, and Close_Visit, which together constitute the visit lifecycle API surface used by the Visit Work Package UI. The ETRM 12.2.2 metadata documents 16 callable units, including the "process_visit" search term mapped to stage-level processing routines such as PROCESS_STAGETYP_ASSOC and the stage validation routines driven during a visit's processing.

Key Procedures and Functions

  • UPDATE_STAGES — Modifies existing stage records for a visit, including stage name, duration, and planned start/end times, honoring object version concurrency.
  • GET_STAGES_DETAILS — Retrieves stage attributes for a given visit or stage identifier for display or downstream processing.
  • CREATE_STAGES — Inserts new stage rows into the visit structure, typically generated from a visit type's stage template.
  • DELETE_STAGES — Removes specified stage records belonging to a visit.
  • DELETE_ALL_STAGES — Clears every stage associated with a visit, used when regenerating a visit plan.
  • VALIDATE_STAGE_UPDATES — Checks whether proposed stage changes are permissible, including hierarchy and rule constraints.
  • CHECK_STAGE_NAME_OR_ID — Verifies uniqueness or existence of a stage name or identifier before insert or update.
  • PROCESS_STAGETYP_ASSOC — Processes associations between stages and stage types, driving the stage-type assignment logic invoked during visit processing.
  • VALIDATE_STAGE_RULES — Evaluates stage rule definitions to confirm sequencing and dependency compliance.
  • ASSOC_VISITTYPE_TO_VISIT — Links a visit type definition to a visit instance so its stage structure can be applied.
  • GET_VISIT_STAGE_NUMBER — Derives the sequential stage number assigned within a visit.
  • UPDATE_STAGES_HIERARICHY — Maintains stage hierarchy relationships when stages are reordered or nested.
  • UPDATE_STG_RUL_HIERARCHY — Maintains hierarchy for stage rules corresponding to stage structure changes.
  • UPDATE_AS_STAGE_RULE_DEL — Handles stage-rule deletion cascades and constraint cleanup.
  • VALIDATE_STAGE_DATES — Confirms planned stage dates fall within allowable visit and shift windows.
  • COMPUTE_STAGE_END_DATE — Calculates stage end dates from duration and shift calendar data.

Tables Accessed

Usage Notes

AHL_VWP_VISITS_STAGES_PVT is invoked exclusively through Oracle Forms and other server-side packages; it is not exposed as a concurrent program entry point. The Visit Work Package planning form calls these procedures when a user creates or edits stages, reassigns visit types, or triggers visit processing. Nine other packages reference this package, confirming it as an internal service consumed by the public VWP visit APIs and stage-handling logic rather than by custom extensions. Because it is private, customers should not call it directly; changes to stage data should be performed through the supported Visit Work Package UI or public APIs. Its presence in both 12.1.1 and 12.2.2 keeps the stage-management logic consistent across the two releases.