Search Results c_status




Overview

The APPS.CSM_HA_SERVICE_PUB package body is a public API within Oracle E-Business Suite that supports High Availability (HA) configuration for the CSM (Service) module's workflow components. Its central purpose is to determine, at runtime, whether specific workflow item types, events, and Business Event System (BES) subscriptions are "enabled" under the currently active High Availability profile setting. This allows the application to behave differently depending on whether the system is operating in a normal recording mode, an apply mode, or a stopped state. The package is part of the HA infrastructure that governs how workflow-related activity is captured and replayed across environments, and it exposes a small, focused public interface of four functions. The header comment indicates a build date of 2010, consistent with the 12.1.1 codebase, though the object remains documented in 12.2.2.

Key Procedures and Functions

  • GET_HA_STATUS — Returns the current High Availability status as a VARCHAR2. It retrieves the HA profile value through CSM_HA_EVENT_PKG.GET_HA_PROFILE_VALUE and defaults to HA_STOP when no profile value is available, using NVL.
  • IS_WF_ITEM_TYPE_ENABLED — Accepts a workflow item type and returns a single-character status indicating whether that item type is enabled under the active HA profile.
  • IS_WF_EVENT_ENABLED — Accepts an event name and returns the enabled status for that workflow event, restricted to rows where the event subscription GUID is null.
  • IS_WF_BES_ENABLED — Accepts a subscription GUID (RAW) and returns whether the corresponding Business Event System subscription is enabled, matching on the subscription GUID.

All three "enabled" functions share an identical internal cursor, c_status, which selects a DECODE on GET_HA_STATUS against the CSM_HA_ACTIVE_WF_COMPONENTS table. When the status is HA_RECORD the ENABLED_ON_RECORD column is returned; when HA_APPLY the ENABLED_ON_APPLY column is returned; when HA_STOP the DECODE yields NULL, signalling no information. Each function opens the cursor, fetches a single value into a local VARCHAR2(1), closes it, and returns the result.

Tables Accessed

The package reads from a single table, CSM_HA_ACTIVE_WF_COMPONENTS, accessed through an APPS synonym. This table stores the High Availability enablement flags for workflow components, including columns ENABLED_ON_RECORD and ENABLED_ON_APPLY, along with identifying keys such as WF_ITEM_TYPE, WF_EVENT_NAME, and WF_EVENT_SUBSCRIPTION_GUID. The three query variants differ only in their WHERE predicates: filtering by item type, by event name with a null subscription GUID, or by a specific subscription GUID. The package performs no inserts, updates, or deletes; it is strictly a read-only query interface.

Usage Notes

CSM_HA_SERVICE_PUB is invoked as a runtime decision helper by other workflow and service modules that need to know whether to record or apply HA changes for a given component. The GET_HA_STATUS function serves as the master switch, and the three IS_* functions translate that switch into component-level enablement answers. Because the object is classified as a PUB (public) API and is referenced by one other package, custom code and extensions may call these functions directly, though the typical invocation path is internal to the CSM HA infrastructure. When the HA profile is set to HA_STOP, all three "enabled" functions return NULL, which callers should interpret as "no information" rather than "disabled" — a distinction that matters when building conditional logic around HA behaviour. The functions are lightweight and side-effect free, making them safe to call repeatedly, but callers should be aware that each call executes a separate cursor fetch against CSM_HA_ACTIVE_WF_COMPONENTS.