Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [Ens] >  [Alerting] >  [NotificationManager]
Private  Storage   

persistent class Ens.Alerting.NotificationManager extends Ens.Alerting.BaseProcess

Business Process that accepts incoming Ens.Alerting.NotificationRequest messages and determines three things:

For each incoming NotificationRequest, a user callback sequence is initiated from the OnRequest() method. The three stages of the callback sequence are as follows:

  1. The OnProcessNotificationRequest() method is invoked. Users can override this method to perform any extended custom processing they choose, as well as indicate whether no further processing should be performed for the current request.
  2. The code checks whether NotificationTransform is defined.
    • If no transform is defined, the default processing in stage 3 controls the behaviour.
    • Otherwise, the process will call the GetNotifyContext() helper method to create a context object of type Ens.Alerting.Context.Notify. The helper method can be overridden to return user-defined subclasses of the context class. The incoming NotificationRequest object will be supplied as the source of the transform, and the returned context object will be supplied as the target of the transform specified in NotificationTransform. As a result, the transform should specify create="existing" if you wish to make use of the object created by the GetNotifyContext() callback. The transform should specify any operations that the NotificationRequest should be sent to using the Transforms list of the context object that is in the target, as well as specifying the list of AlertDestinations for each desired target. The transform should NOT update the AlertDestinations property of the original NotificationRequest, as this property is ignored when processing the data. The transform should specify whether a notification should be sent via the Notify property of the context object.
  3. If no actions are taken in stages 1 or 2, the process's default behaviour is to send the notification request to the default Notification Operation specified for the current production.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 1 6


Summary

This is a Business Process class.

RequestResponse
Ens.Alerting.NotificationRequest %Library.Persistent

Properties
%ConfigName %ConfigQueueName %CurrentResponseHeader %IsCompleted
%IsTerminated %IsTimerInterrupted %LastActionTime %LastHandledTime
%LastReportedError %MasterPendingResponses %MasterPendingResponsesOld %MessagesReceived
%MessagesReceivedOld %MessagesSent %MessagesSentOld %PrimaryRequestHeader
%PrimaryResponseHeader %QuitTask %RepliedStatus %SessionId
%StatusCode %SuperSession %TimeCompleted %TimeCreated
%WarnedLatest %isShadow %request %response
%responseClassName %responseId Adapter AlertGroups
AlertOnError AlertRetryGracePeriod BusinessPartner FailureTimeout
InactivityTimeout NotificationTransform QueueCountAlert QueueWaitAlert
ReplyCodeActions Retry RetryInterval SuspendMessage
ThrottleDelay

Methods
%%CLASSNAMELogicalToStorage %%CLASSNAMEStorageToLogical %AddToSaveSet %AddToSyncSet
%BMEBuilt %BuildIndicesAsync %BuildIndicesAsyncResponse %CheckConstraints
%CheckConstraintsForExtent %ClassIsLatestVersion %ClassName %ComposeOid
%ConstructClone %Delete %DeleteExtent %DeleteId
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Exists
%ExistsId %Extends %GUID %GUIDSet
%GetLock %GetParameter %GetSwizzleObject %Id
%InsertBatch %IsA %IsModified %IsNull
%KillExtent %KillExtentData %LoadFromMemory %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnClose
%OnDeleteFinally %OnDetermineClass %OnNew %OnOpenFinally
%OnSaveFinally %Open %OpenId %OriginalNamespace
%PackageName %PhysicalAddress %PurgeIndices %Reload
%RemoveFromSaveSet %ResolveConcurrencyConflict %RollBack %Save
%SaveDirect %SaveIndices %SerializeObject %SetModified
%SortBegin %SortEnd %SuperSessionSet %SyncObjectIn
%SyncTransport %UnlockExtent %UnlockId %ValidateIndices
%ValidateObject %ValidateTable AdapterName AssignOneSetting
ClearAllPendingResponses DeferResponse EnumerateSettingsClose EnumerateSettingsExecute
EnumerateSettingsFetch GenerateSuperSession GetDeferredResponseToken GetMsgHdrRequestKey
GetNotifyContext GetProductionSettingValue GetProductionSettings GetPropertyConnections
GetSettings GetShadowInstance IsResponsePending OnComplete
OnError OnErroredResponse OnFailureTimeout OnGenerateSuperSession
OnGetConnections OnGetReplyAction OnInit OnKeepalive
OnMonitor OnProcessNotificationRequest OnProductionStart OnProductionStop
OnRequest OnResponse OnTearDown OnTimeout
QueueName RemovePendingResponse Reply ReplyError
SendAlert SendDeferredResponse SendRequestAsync SendRequestSync
SetTimer WillHandleErroredResponse findTarget


Parameters

• parameter SETTINGS = "NotificationTransform:Basic:dtlSelector";
Don't show the setting for AlertOnError.

Properties

• property NotificationTransform as %String(MAXLEN=256);
Name of the transform to invoke when determining which config items and eventual recipients the NotificationRequest should be sent to. The transform should be configured to accept a target of type Ens.Alerting.Context.Notify, which includes properties allowing the user to choose the config items and alert destinations as well as specifying whether a notification should be sent.

Methods

• method GetNotifyContext(pNotificationRequest As Ens.Alerting.NotificationRequest, Output pNotificationContext As Ens.Alerting.Context.Notify) as %Status
Callback to create the rule context used for the rule to decide whether a NotificationRequest should be sent to a Notification Operation, as well as which operations should be called, as well as the recipients for each operation. Users can override this method in subclasses to supply context objects based on the user's requirements.
• classmethod OnGetConnections(Output pArray As %String, pItem As Ens.Config.Item)
Add connection to the Production's AlertNotificationOperation and targets of the NotificationTransform
• method OnInit() as %Status
Ensure that the transform specified in NotificationTransform exists.
• method OnProcessNotificationRequest(pNotificationRequest As Ens.Alerting.NotificationRequest, Output pProcessingComplete As %Boolean) as %Status
Callback to allow users to implement any actions they choose in subclasses. The pProcessingComplete flag controls whether any further actions should be taken for the current alert. If all intended actions have been completed, then pProcessingComplete should be set to true.
• method OnRequest(pNotificationRequest As Ens.Alerting.NotificationRequest, Output pResponse As %Library.Persistent) as %Status
Handle notification requests of type Ens.Alerting.NotificationRequest using the callback sequence described in this class comments for Ens.Alerting.NotificationManager.
• classmethod findTarget(line) as %String


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.