Problem with Gateway Message Handler - doesn't execute

Hi I have a problem. I need to run a script on an IO server from a Frontend server, it is used to control a DNP3. On the IO server I have the connection to the device and on the frontend I have the control.

I'm planning to implement this: system.util.sendMessage but in truth I'm also having trouble running it on the local fronted project... Why is the message handler not executing? I attach screen shots below.




image

Best Regards

If you are expecting to return a value, you should use system.util.sendRequest(). If you are messaging a remote server, then you need to also specify the remote server.

def runAction(self, event):
    self.getSibling('TextArea').props.text = system.util.sendRequest(project='Nomad_Global', messageHandler='Testy',remoteServer='Your Server Name')

However, why not just set up the Back end server as a Remote Tag Provider to the Front End Server? Then there would be no need for a message handler at all.

Also, you should really be using the onActionPerformed as opposed to the onClick, the onClick will occur even if the button is disabled.

2 Likes