isAlarmActive and runScript issues

Hi all,
I’m experiencing the following issue: I’m using isAlarmActive (tried with no polling time and with polling time set to 2000 msec) and runScript (polling time 1000 msec) to animate some properties. The pages where those bindings are used load pretty well if the client is running on a PC in the same LAN of the gateway. However if I connect to the gateway through a remote assistance appliance (Secomea) the page loads partially and freezes just before loading those components (all other pages load correctly).

Any suggestion?

Thanks in advance, regards

There’s a known bug with isAlarmActive being called from expressions sometimes locking up the EDT.
Rather than using a runScript binding, I would recommend using a client timer script writing to a tag.

Many thanks PGriffith. What is strange to me is that the issue occurs only if the client is connected through a remote assistance appliance: that’s why I was thinking that isAlarmActive and runScript use some other ports than 8088, isn’t that true?

Any expression function that causes a round-trip call to the gateway will be very sensitive to network latency, pausing the client gui due to Java Swing’s single-threaded design. runScript() isn’t guilty by itself, but becomes guilty if it uses a script function that makes a gateway call. This would be true whether the runScript calls something that reads tags, checks alarm status, executes SQL, or even uses the synchronous form of sendRequest.

If you want to keep your GUI responsive, don’t do anything in a foreground event script or runScript that could possibly need a gateway round-trip call.

1 Like