Generating messages

Use the method createMessage in rules to create message text. The message that the rule creates can be either a simple text message or a more involved, constructed message.

The following code is an example of a simple text message that uses the Gosu in-line dynamic template functionality to construct the message. Gosu in-line dynamic templates combine static text with values from variables or other calculations that Gosu evaluates at run time. For example, the following createMessage method call creates a message that lists the event name and the entity that triggered this rule set.

messageContext.createMessage("${messageContext.EventName} - ${messageContext.Root}")

See also