I'm implementing custom tool to create ticket for selected alarm. Tool is impelemented as automation script. I'd like to get Severity and RootTime as script parameters, but not able to do that. I'm able to fetch Tool should fetch as much data as possible from alarm itself. I'm able to fetch attributes like alarmId and rootId using the following functions - engine.GetScriptParam("rootId").Value; engine.GetScriptParam("alarmId").Value). Also, I'm able to get custom alarm properties with GetAlarmProperty. Is there a way to get in a similar way Severity and RootTime?
The following - engine.GetScriptParam("Severity").Value - does not work.
Hi Mateusz,
To get the RootID and Severity, you can use the following code. You only need to supply the GetAlarmDetailsMessage with the DataMinerID and AlarmID.
GetAlarmDetailsMessage message = new GetAlarmDetailsMessage(iDmaID, iAlarmID);
DMSMessage[] responseMessage = Engine.SLNet.SendMessage(message);
if (responseMessage.Length > 0)
{
AlarmEventMessage alarmEvent = (AlarmEventMessage)responseMessage[0];
int RootAlarmID = alarmEvent.RootAlarmID;
string severity = alarmEvent.Severity;
}