Ok. So.
I disabled the ‘gateway scoped’ message handler in the Alarming page. I changed the Alarming page’s inheritance from ‘global’ to my new ‘Global Event Scripts’ page. I disabled the ‘Global Event Scripts Caller’ page (so that my timer would not run at double time).
I then created a message handler in Global Event Scripts with the same name and code.
When I went to acknowledge an alarm in my page I got the following error:
Gateway script MessageHandlerException, project ‘D3Alarm’, message handler ‘publicAcknowledge’: com.inductiveautomation.ignition.common.script.message.MessageHandlerException: The message handler “publicAcknowledge” could not be found! Check your event script message handlers.
It was set to inherit from a project that had such a handler defined. The relevant code calling the message handler is:
system.util.sendMessage(project = 'D3Alarm',messageHandler = 'publicAcknowledge',payload = {'uuid':uuid,'ackMsg':ackMsg,'user':info[0]}, scope = 'G')
And it was not able to find a 'G’ateway scoped message handler, because the one defined in the project itself was disabled and the one in the inheriting project was somehow not accessible.
As I said, I noticed that in almost all other projects, ‘gateway events’ are greyed and inaccesible by default. Right clicking on Gateway events in such a project gave an option to ‘Override Resource’ which seemingly makes gateway events defineable at the client level, and also seems to supersede any events defined at the gateway (or parent) level!
I also don’t see a way to remove the override. Do these facts imply anything? As it is, I think the safest thing, for this project is:
- It’s gateway events are overriden. It is apparently a gateway/parent unto itself
- End all inheritances
- Move all gateway scoped events that had been defined in parent projects to the alarm page itself
I think the useage most in line with how Inductive wants us to work is to define all gateway events in a parent project, but that seems impossible unless I can remove the override.