Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

EnsLib.EMail.AlertOperation

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

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.

Property Inventory

Method Inventory

Parameters

parameter ADAPTER = EnsLib.EMail.OutboundAdapter;
Inherited description: The type of adapter used to communicate with external systems
parameter SETTINGS = IncludeDetails:Basic,SubjectPrefix:Basic,IncludeNodeinSubject:Basic,IncludeManagedAlertHistory:Basic;
Inherited description: 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;
Inherited description: The adapter instance
Property methods: AdapterGet(), AdapterGetSwizzled(), AdapterIsValid(), AdapterNewObject(), AdapterSet()
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 methods: IncludeDetailsDisplayToLogical(), IncludeDetailsGet(), IncludeDetailsIsValid(), IncludeDetailsLogicalToDisplay(), IncludeDetailsNormalize(), IncludeDetailsSet()
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 methods: IncludeManagedAlertHistoryDisplayToLogical(), IncludeManagedAlertHistoryGet(), IncludeManagedAlertHistoryIsValid(), IncludeManagedAlertHistoryLogicalToDisplay(), IncludeManagedAlertHistoryNormalize(), IncludeManagedAlertHistorySet()
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 methods: IncludeNodeinSubjectDisplayToLogical(), IncludeNodeinSubjectGet(), IncludeNodeinSubjectIsValid(), IncludeNodeinSubjectLogicalToDisplay(), IncludeNodeinSubjectNormalize(), IncludeNodeinSubjectSet()
property SepLine as %String [ InitialExpression = "===============================================================" ];
Property to hold the basic text used to separate sub-sections of each email message.
Property methods: SepLineDisplayToLogical(), SepLineGet(), SepLineIsValid(), SepLineLogicalToDisplay(), SepLineLogicalToOdbc(), SepLineNormalize(), SepLineSet()
property SubjectPrefix as %String;
Prefix to include in the subject of emails sent by this system.
Property methods: SubjectPrefixDisplayToLogical(), SubjectPrefixGet(), SubjectPrefixIsValid(), SubjectPrefixLogicalToDisplay(), SubjectPrefixLogicalToOdbc(), SubjectPrefixNormalize(), SubjectPrefixSet()

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
Inherited description: This is the default message handler. All request types not declared in the message map are delivered here

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab