If you select the Write To File option when you define a notification method, all the basic environment and attribute variables are written to a text file, which is closed before executing the notification method script or program. This notification file is written every time the notification method is invoked for a contact, and is a handy mechanism for passing relevant information to the notification script that is not otherwise available in the environment.
The full path of the notification file is set in the NX_NTF_FILENAME environment variable, which is available to the notification method’s process. The file name is also added to the end of value you enter in the Notification Method field when defining the notification method. For example, if the Notification Method is ‘pdm_perl –w mymethod.pl’, then the actual process executes ‘pdm_perl –w mymethod.pl unique_notification_file_name’.
Important! The administrator can clean up the notification files. This clean-up is especially important for a site using a high volume of notifications, which can result in thousands of notification files a day. The files are located in the standard temporary directory (TEMP on Windows and TMP on UNIX). One suggestion is to delete the file at the end of the notification method script/program.
The notification file is a standard text file that is divided into sections. Each line contains either an attribute/value pair or a section marker. Each notification file has three sections, as described by the following. All sections begin with “-----” followed by a new line.
Provides information about the issue.
Provides information about the change order.
Provides information about the request.
Provides information about the recipient.
Provides the same information that is available from the basic environment variables.
Note: The section names for the ticket and recipient are actually the object names for the attributes in that section. For a complete list of all attribute names for any object, see the CA SDM Technical Reference Guide.
Several lines of attribute/value pairs, each of which represents an attribute of the corresponding object, are contained in each section. The Attribute Variables in this section provide the detailed information about how these lines are formatted and what they mean.
Line breaks in an attribute value are reproduced as new lines in the notification file. Your notification method process can only use the attribute or value lines that begin with NX_NTF, and section markers. Generate a sample file and look at its contents before you work with a notification file in your notification method process.
Copyright © 2013 CA.
All rights reserved.
|
|