This chapter describes how to configure a production to alert users about important events, such as events that require user intervention. It includes the following sections:
An alert sends notifications to applicable users while an Ensemble production is running, in the event that an alert event occurs. The intention is to alert a system administrator or service technician to the presence of a problem. Alerts may be delivered via email, text pager, or another mechanism.
The Ensemble alert mechanism works as follows:
As part of the development process:
Within business host classes for the production, the developers include code that generates alerts when applicable.
For information, see “Generating Alerts” in the chapter “Programming in Ensemble” in Developing Ensemble Productions.
The developers define an additional business host class called an alert processor (also called an alert target). The alert processor contains the logic to contact each user in the most appropriate way.
The developers might also develop business operations for the alert processor to call.
For information, see “Defining Alert Processors” in Developing Ensemble Productions.
You configure the production to include the alert processor, along with any business services that it requires. For details, see the next section.
Configuring an Alert Processor
Each time any alert is sent, the alert text is added to the Ensemble Event Log. This mechanism might be too passive for the most urgent messages. If you want the production to also actively seek the user, you must define and configure a business host that has the ability to contact a user device. This business host is known as an alert processor or an alert target.
To add the alert processor to the production:
Add the business host class to the production. This class is a business operation or business process class, depending on its implementation.
For the configuration name, specify Ens.Alert
If the alert processor has settings such as email addresses and telephone numbers, configure those.
Add any business services that the alert processor calls.
Any production can include no more than one alert processor.
Configuring Alerts on Errors
Ensemble can send alerts automatically whenever a business host encounters an error condition. The Alert On Error setting controls this behavior. If Alert On Error is True, then whenever the business host encounters an error, Ensemble triggers an alert.
Note that business hosts provide an optional grace period that enables the business host to retry before triggering the alert. Depending on the kind of business host, this grace period is specified by the setting Alert Grace Period or Alert Retry Grace Period.
For details on these settings, see “Settings in All Productions.”
Configuring Alerts on Queue Buildups
Ensemble can send alerts when a business host’s queue has too many messages or has messages that have waited too long. To enable these alerts, specify the following settings with nonzero values:
Queue Count Alert — Minimum number of items in the queue needed to trigger an alert. This alert has the prefix QueueCountAlert: (not localized). This alert is useful in situations where large queues are building up.
Queue Wait Alert — Minimum length of time for a message to wait in a queue to trigger an alert. This alert has the prefix QueueWaitAlert: (not localized). This alert is useful in situations where a queue is not processing messages.
For details, see “Settings in All Productions.”
Other System Alerts
Ensemble generates alerts on other occasions, including the following:
When a job is marked as dead.
This alert is prefixed with the non-localized text: DeadJobAlert: for simplified routing and handling.
When a business operation suspends its current message.