Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / EnsLib.EMail.AlertOperation
Private  Storage   


class EnsLib.EMail.AlertOperation extends

This is a simple EMail Alert Operation.

Ensemble 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.

Ensemble sends all Ens.AlertRequest messages to the Ensemble 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 Ensemble.


Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 6 6


This is an Ensemble Business Operation class.

The associated Adapter class is EnsLib.EMail.OutboundAdapter.

%Library.Persistent Ens.Response

%ActionHint %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

%%OIDGet %AddToSaveSet %BindExport %BuildObjectGraph
%ClassIsLatestVersion %ClassName %Close %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IncrementCount %IsA %IsModified
%New %NormalizeObject %ObjectModified %OnClose
%OnNew %OriginalNamespace %PackageName %RemoveFromSaveSet
%SerializeObject %SetModified %SuperSessionSet %ValidateObject
AdapterName AddBasicData AddManagedAlertHistory AssignOneSetting
CloseIOLogEntry CreateEmailFromAlertRequest DeferResponse EnumerateSettingsClose
EnumerateSettingsExecute EnumerateSettingsFetch EvalInitialExpression GenerateSuperSession
GetDeferredResponseToken GetMessageList GetProductionSettingValue GetProductionSettings
GetPropertyConnections GetRequestClassList GetResponseClassList GetSettings
GetShadowInstance GetSystemInfo GetUpdateText IncludeSuperSession
MessageHandler MessageHeaderHandler NewIOLogEntry OnAlertNotification
OnAlertRequest OnError OnFailureTimeout OnGenerateSuperSession
OnGetConnections OnGetReplyAction OnInit OnKeepalive
OnMessage OnMonitor OnProductionStart OnProductionStop
OnTask OnTearDown QueueName SaveIOLogEntry
SendAlert SendDeferredResponse SendRequestAsync SendRequestSync
SendRequestSyncMultiple acceptRequestAsync acceptRequestSync doReplyAction
finalReplyAction findCachedObject initConfig inprocRequest
makeConnections queueRequestAsync queueRequestSync


• 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


• 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 Ensemble 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.


• 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