There are cases where the Business Logic is required to report to the log or trigger an alert message. This is needed when the messages should be sent based on the event processing. Any information that is gathered during the process of calculation and which may be valuable can be sent as an alert. For example, an alert message can be sent when a specific event is under the specified resolution time threshold or in trend analysis when a certain number of consecutive failures has bee reached.
"Out" is a global Business Logic object that enables the formula to send alerts as well as log messages. It has two methods associated with it which have the following form:
Alert(<Event type>, <Resource name>, <value1, value2>, …<value16>)
This command sends an alert of a specified event type. However this event type needs to be created manually for the purposes of this alert. The number of values and their type must correspond to the Event type definition.
Log(<Message>,<Level>)
This command sends a message to the system log. The first parameter is the information message reported, and can be free text. You can also append the values of variables to this string to give contextual meaning to the message. The 'Level' parameter can take one of the following values:
|
Value |
Description |
|
W |
A warning message is reported. |
|
E |
An error message is reported. |
|
D |
An information message is reported only when running in the Business Logic Scope. When running in PslWriter, no message is reported. This is the default level. It is used mostly for debugging purposes. |
Example:
The following is taken from a case where the Infrastructure information of the event was expected before the actual incident details. An alerting mechanism was set up to notify the Administrator of this condition to prompt fixing the issue.
Out.Alert "Site Unknown Alert", Context.ClusterItem, Context.Rule
Out.Log("Fault Event Received for a Site with no infrastructure details: " & Context.ClusterItem)
|
Copyright © 2013 CA.
All rights reserved.
|
|