Customizing an Alert Email Template
You can configure an alert handler to send email to a specified email address when an alert is triggered. Each alert type, or alert type family, has a default email template—an XSL file that is used to create email messages. Each alert type uses a single email template path. For example the Agent Down alert uses the template manager.agentDownTemplate.xsl.
The name of a default email template is usually composed of the:
|
•
|
Module in which the alert is defined. |
|
•
|
Name or family name of the alert type. |
For example, one of the templates is named manager.licenseExpiringTemplate.xsl. It is defined in the manager module for the family of License Expiring alerts. If there is no email template that matches the alert type or alert type family, the genericAlert.xsl template is used.
Default email templates are located in the admin_install_directory/site/webapps/flexnet/templates directory. These email templates can be customized. Before renaming a customized email template, decide whether the customizations will apply to all alert emails that use this template.
Important:You should be familiar with XSLT before attempting to edit email templates.
To customize an alert email and specify the customized email template for an alert:
|
1.
|
Open a Command Prompt window and change to the FlexNet Manager for Engineering Applications installation directory (admin_install_directory). |
|
2.
|
Create a directory named custom in the admin_install_directory using the command mkdir, creating the following directory structure in the custom directory to mimic the path to the default email templates: |
custom/webapps/flexnet/templates
|
3.
|
Locate the default email template and copy it to the custom templates directory that you just created. |
|
4.
|
Edit the copy of the email template and save the file. |
|
5.
|
Rename the customized file if necessary. |
|
•
|
If the changes to the email template apply to all email messages that are generated using this template, do not rename the template file. If it is not renamed, it will replace the default template in the site directory, but the original will remain intact in the releases directory in case it has to be recovered. |
|
•
|
If you want to target your edits to the email template used for only one of a family of alerts, rename the email template. |
|
6.
|
Stop FlexNet Manager for Engineering Applications Admin. |
|
•
|
To stop Admin from the command line, navigate to the Admin installation location, then type the command: flexnet stop |
|
•
|
If you configured Admin to run as a Windows service, you can stop the service from the Windows Services pane. |
|
7.
|
To load files from the custom directory into the site directory, in the admin_install_directory, type the command: flexnet site make |
|
8.
|
Restart FlexNet Manager for Engineering Applications Admin. |
|
•
|
To start Admin from the command line, navigate to the Admin installation location, then type the command: flexnet start |
|
•
|
If you configured Admin to run as a Windows service, you can start the service from the Windows Services pane. |
|
9.
|
From a supported web browser, log in to FlexNet Manager for Engineering Applications Admin. |
|
10.
|
To configure an alert definition to use the customized email template: |
|
a.
|
From the Alerts tab, under Alerts, click Configure Alerts. |
|
b.
|
Click Configure to display an alert’s Configure Alert Definition page. |
|
c.
|
To change the email template, specify the template name in the Email Template field. |
Note:You must subscribe to an alert in order to see alerts as they are triggered (as configured). See Alert Subscriptions for more information.