This function sends a message to clients running under the Gateway or to a project within the Gateway itself. To handle received messages, you must set up event script message handlers within a project. These message handlers run Jython code when a message is received. You can add message handlers under the "Message" section of the client/Gateway event script configuration dialogs.
Messages cannot be received within a Designer. However, messages can be sent within the Designer in a script (assuming that read/write comm is enabled).
This scripting function has no Client Permission restrictions.
system.util.sendMessage(project, messageHandler, [payload], [scope], [clientSessionId], [user], [hasRole], [hostName], [remoteServers])
String project - The name of the project containing the message handler.
String messageHandler - The name of the message handler that will fire upon receiving a message.
Dictionary[String, Any] payload - A dictionary which will get passed to the message handler. Use "payload" in the message handler to access dictionary variables. [optional]
String scope- Limits the scope of the message delivery to "C" (clients), "G" (Gateway), "CG" for clients and the Gateway, or "S" Session. Any combination of C, G, and S are available. Defaults to "CS" if the user name, role, or host name parameters are set, and to "CGS" if none of these parameters are set. [optional]
String clientSessionId - Limits the message delivery to a client with the specified session ID. [optional]
String user - Limits the message delivery to clients where the specified user has logged in. [optional]
String hasRole - Limits the message delivery to any client where the logged in user has the specified user role. [optional]
String hostName - Limits the message delivery to the client that has the specified network host name. [optional]
List remoteServers - A list of Strings representing Gateway Server names. The message will be delivered to each server in the list. Upon delivery, the message is distributed to the local Gateway and clients as per the other parameters. [optional]
List - A List of strings containing information about each system that was selected for delivery, where each List item is comma-delimited.
Gateway, Vision Client, Perspective Session
system util sendMessage, util.sendMessage