Home > Class Reference > ENSLIB namespace > EnsLib.EMail.AlertOperation
Private  Storage   

EnsLib.EMail.AlertOperation


class EnsLib.EMail.AlertOperation extends Ens.Alerting.NotificationOperation

This is a simple EMail Alert Operation.

InterSystems IRIS automatically sends all Ens.AlertRequest messages to the production item named Ens.Alert, if it exists. This production item may be a business operation, like this one, or it may be a routing process that provides logic to direct alerts to various business operations.

InterSystems IRIS sends all Ens.AlertRequest messages to the Event Log, regardless of whether or not Ens.Alert exists. If there is no production item named Ens.Alert, the place to find alert messages is in the Event Log.

This class can also send email message for Managed Alerts created by InterSystems IRIS.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 6 6


Summary


This is a Business Operation class.

The associated Adapter class is EnsLib.EMail.OutboundAdapter.

RequestResponse
%Library.Persistent Ens.Response

Properties
%AlertStartTime %ConfigName %ConfigQueueName %LastActionTime
%LastHandledTime %LastReportedError %QuitTask %RequestHeader
%SessionId %SuperSession %WarnedLatest %isShadow
Adapter AlertGroups AlertOnError AlertRetryGracePeriod
ArchiveIO BusinessPartner DeferResponse FailureTimeout
IOLogEntry InactivityTimeout IncludeDetails IncludeManagedAlertHistory
IncludeNodeinSubject IncludeUTCTimes InstanceName NoFailWhileDisconnected
QueueCountAlert QueueWaitAlert ReplyCodeActions Retry
RetryCount RetryInterval SendSuperSession SepLine
SubjectPrefix SuspendMessage SystemName ThrottleDelay

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OnClose %OnNew
%OriginalNamespace %PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %SuperSessionSet %ValidateObject AdapterName
AddBasicData AddManagedAlertHistory AssignOneSetting CloseIOLogEntry
CreateEmailFromAlertRequest DeferResponse EnumerateSettingsClose EnumerateSettingsExecute
EnumerateSettingsFetch GenerateSuperSession GetDeferredResponseToken GetMessageList
GetProductionSettingValue GetProductionSettings GetPropertyConnections GetSettings
GetShadowInstance GetSystemInfo GetUpdateText IncludeSuperSession
NewIOLogEntry OnAlertNotification OnAlertRequest OnError
OnFailureTimeout OnGenerateSuperSession OnGetConnections OnGetReplyAction
OnInit OnKeepalive OnMessage OnMonitor
OnProductionStart OnProductionStop OnTearDown QueueName
SaveIOLogEntry SendAlert SendDeferredResponse SendRequestAsync
SendRequestSync


Parameters


• parameter ADAPTER = "EnsLib.EMail.OutboundAdapter";
The type of adapter used to communicate with external systems
• parameter SETTINGS = "IncludeDetails:Basic,SubjectPrefix:Basic,IncludeNodeinSubject:Basic,IncludeManagedAlertHistory:Basic";
List of properties can be set as settings in the configuration file format is a comma separated list of property names

Properties


• property Adapter as EnsLib.EMail.OutboundAdapter;
The adapter instance
• property IncludeDetails as %Boolean [ InitialExpression = 0 ];
Control whether detailed information is added to emails sent for standard Ens.AlertRequest messages. The default is 0 (or False) for backward compatibility reasons.
• property IncludeManagedAlertHistory as %Integer(DISPLAYLIST=",False,Oldest First,Newest First",VALUELIST=",0,1,2") [ InitialExpression = 0 ];
Control whether all Managed Alert actions will be included in the email, and the order in which the actions are included.
• property IncludeNodeinSubject as %Boolean [ InitialExpression = 0 ];
This controls whether network information for the node is included in the subject of the outgoing email. If you have many InterSystems IRIS installations on multiple systems, this may make it much simpler to identify which system issued an alert.
• property SepLine as %String [ InitialExpression = "===============================================================" ];
Property to hold the basic text used to separate sub-sections of each email message.
• property SubjectPrefix as %String;
Prefix to include in the subject of emails sent by this system.

Methods


• method AddBasicData(pMailMessage As %Net.MailMessage, pAlertText As %String = "", pAlertTime As Ens.DataType.UTC = "", pSourceConfigName As %String = "", pProduction As %String = "", pSessionId As %Integer = "", pSystemName As %String = "", pInstanceName As %String = "") as %Status
Helper method to write properties common to basic Ens.AlertRequest and Ens.Alerting.ManagedAlert instances.
• method AddManagedAlertHistory(pMailMessage As %Net.MailMessage, pManagedAlert As Ens.Alerting.ManagedAlert) as %Status
Helper method to write out the Managed Alert History for a given ManagedAlert instance.
• method CreateEmailFromAlertRequest(pAlertRequest As Ens.AlertRequest, Output pMailMessage As %Net.MailMessage) as %Status
Create a notification email from a standard Ens.AlertRequest object.
• method OnAlertNotification(pNotificationRequest As Ens.Alerting.NotificationRequest, Output pResponse As Ens.Response) as %Status
Send a notification email for the incoming Ens.Alerting.NotificationRequest in pNotificationRequest.
• method OnAlertRequest(pAlertRequest As Ens.AlertRequest, Output pResponse As Ens.Response) as %Status
Main handler for requests of type Ens.AlertRequest. If IncludeDetails is true, then the actual output will be performed in CreateEmailFromAlertRequest.
• method OnMessage(pRequest As %Library.Persistent, Output pResponse As Ens.Response) as %Status
This is the default message handler. All request types not declared in the message map are delivered here