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