set-message trigger action
Overview
A trigger action that displays a custom screen notification. The message can be customized with a title, message content, and notification style.
When the workflow trigger event occurs, the trigger checks that any required conditions are met, and if they are, the "set-message"
action displays an on-screen notification message.
One or more trigger actions can be set for a named event in the workflow.
"set-message"
The trigger action "set-message"
creates a message notification and can include a message title and a body.
It can be set as info, warning, or error and set to auto-close after a specified period or require user acknowledgment.
action (set-message)
type ❗️ Indicator of the level of the message
info
warning
error
title For adding a title to the message
body❗️ For adding the content for the body of the message
❗️ Mandatory parameters
type
The "type"
parameter value must be included.
body
The "body"
parameter value must be included.
Trigger example
"triggers":
[
{"event": "on-change-state",
"conditions":
[
{"state":"Expired"}
],
"actions":
[
{"action": "set-message",
"type": "info",
"title": "Stale content",
"body": "Content may be out of date"}
]}
]
When adding the JSON trigger using the workflow builder visual editor, there is no need to include the opening "triggers":
JSON markup notation; it is added automatically by the workflow builder.
The above trigger
listens for a state change event to the Expired state and displays an on-screen message notification on the change of state.
If the "set-messsage
action parameter is "type":"warning
, the displayed notification is:
If the "set-messsage
action parameter is "type":"error
, the displayed notification is: