on-change-state event

Overview

Use the on-change-state event in a workflow trigger to listen for a workflow state transition and execute one or more trigger actions.

By including a trigger condition, the change of state event in a workflow trigger can be constrained to listen for the transition to a named state in the workflow, the workflow final state, or the initial state.

Example “on-change-state" event

"triggers": [     {"event": "on-change-state",     "conditions":     [         {"final":true}     ],     "actions":     [         {"action": "clean-messages"}     ]} ]

The trigger action clears any existing messages on the content

  • "actions":[{ "action":"clean-messages"}],

The messages are only cleared on the change of state to the final state in the workflow

  • "conditions": [{"final": true}],

Trigger events