Promotic

Acknowledge - method of the PmaAlarmGroup object

Description:
Alarm item acknowledgment (acknowledgment of the PmAlarmItem object).
Syntax:
Empty Acknowledge(String sId, [String sUserNote], [Date tTimeAck], [String sExtra])
Parameters:
sId(String) The unique text identifier of the alarm item. See the "Identifier" configurator.
For the multiple acknowledgment of all alarm items, the text "$all" can be set.
Note! For the multiple acknowledgment of all alarm items that are in compliance with filtering criteria, can be entered the "$all" text followed by filtration string. For example"$all;area:boiler1;"
sUserNote[optional] (String) The text note that is stored to the data together with the acknowledged alarm item (it is enabled on the "Storage" tab).
tTimeAck[optional] (Date) The acknowledgment time of the alarm.
If not set, then the computer current time is used.
sExtra[optional] (String) Additional parameters of the method.
Entries are in the KeyVal format, for example "ackerid:operator1;lang:en;".
"ackerid:xx;" - Identifier of the user that acknowledged the alarm.
This identifier is set into the AckerId property of the corresponding alarm and will also be written to disk into the AckerId column (if this column is enabled for writing to disk).
If the parameter is not entered, then the identifier of the user that acknowledged the alarm is used (local user, network user on the Web).
For example"ackerid:operator1;".
"lang:xx;" - Specifies national language for Macro expression $.text.
Language is determined with a text identifier, e.g. "en", "de", "ru" etc. - see Fully supported languages in the PROMOTIC system.
If not set, then the present language of running application is used instead. This is relevant for multiple acknowledgment with filtration string switched on (e.g. "$all;area:boiler1;"), where it is possible to set the language for evaluation of localized texts.
For example"lang:en;".
Note:
The acknowledgment succeeds only if the "Acknowledge" permission is fullfiled.
Calling the Acknowledge method over the acknowledged alarm has no effect. An unacknowledged alarm is acknowledged. The behaviour of the alarm after acknowledgment is specified in the "Acknowledgment type" configurator. The acknowledgment of the alarm is usually done interactively by the user from the viewer of an alarm group.

If there are several instances of the alarm item with the same identifier (caused by states of alarm items inactive unacknowledged (blue)), then the last, the latest old alarm item is acknowledged. Older alarm items can be acknowledged by the PmAlarmItem.Acknowledge method over the reference to the corresponding alarm item obtained by the Item method with using the auxiliary tTimeOn parameter.

After the attempt to acknowledge non-existing alarm item (wrong sId parameter), an error occurs in the INFO system only if in the corresponding PmaAlarmGroup object there is no alarm item with the checked configurator "Template for dynamically created items" (it means that all alarm items of the PmaAlarmGroup object are statically configured).
For the multiple acknowledgment of all alarm items, the text "$all" can be set in the sId parameter, eventually followed by filtration string.

The method is synchronous, it means that it is processed immediately by the alarm subsystem. Nevertheless writing the history to disk is asynchronous, it means that this method passes the request for writing to the history to the alarm subsystem, it is placed into the queue of requests and it is processed later by the alarm subsystem.
Example1:
JavaScriptVBScriptSelect and copy to clipboard

var oAl = pMe.Pm("/Alarm");
oAl.Acknowledge("T1_HI");
Example2:
JavaScriptVBScriptSelect and copy to clipboard

var oAl = pMe.Pm("/Alarm");
oAl.Acknowledge("$all");
Example3:
JavaScriptVBScriptSelect and copy to clipboard

var oAl = pMe.Pm("/Alarm");
oAl.Acknowledge("$all;area:boiler1;source:#begin:temperature;");

History:
Pm8.03.02: New sExtra parameter with ackerid and lang.
Pm8.01.09: Now takes into consideration also the UserNote even for aggregate alarm acknowledgment using the "$all" flag.
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.