|nState||(Long) New required state of an alarm item|
In some cases it is possible to pass directly from the current state to the required state by calling one of the above mentioned methods. In other cases it is not possible to pass directly from one state to another state but some of the above mentioned methods has to be called internally more times and the alarm item must pass through several other states before it is moved to the required state.
The alarm item in the state "active acknowledged (yellow)" can be moved to the state "inactive unacknowledged (blue)" by successive calling the methods Inactivate ("inactive acknowledged (green)"), Activate ("active unacknowledged (red)") and finally Inactivate ("inactive unacknowledged (blue)").
The real sequence of gradually called methods can be found in the history.
This method can be used first of all in the case when the alarms are implemented outside PROMOTIC (e.g. in the PLC device) and PROMOTIC is using them for the visualization. By the onUserItemAction event it is possible to catch even the acknowledgement of these alarms with the result that the acknowledgement in the PROMOTIC system is suppressed and istead of this the information about the acknowledgement is sent to the system reponsible for the alarms (PLC).
The method is synchronous, i.e. 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.
var oAl = pMe.Pm("/Alarm");
var oAlItem = oAl.Item("Temperature");