Trigger actions

Overview

One or more trigger actions can be set for a named event in the workflow.

When the workflow event occurs the trigger checks that any required condition is met, and if met the action(s) will occur.

Actions

A list of actions to perform once the event has occurred and the conditions are fulfilled. A single trigger may include one or more actions.

Triggers are created in JSON code.

"triggers:" [ {"event": "on-change-state", "conditions": [ {"state": "Rejected"} ], "actions": [ {"action":"set-message", "type":"info", "title":"Hey My Wonderful design and Tech Team", "body":"We have some work to do ... it was rejected!!!"} ] } ]

A workflow trigger can be added to a workflow using the visual editor or the code editor.

cdmc_coded_editor_workflowtrigger_on-change-state_set-message_highlighted.png

 

The code editor includes

  • color coding to easily distinguish property names, values, and different data types

  • autocomplete feature

  • dropdown selectors for available property names, including workflow trigger events, conditions, and actions

cdmc_codeditor_trigger_actions_defaultaction_jsonschema.png

If adding the JSON trigger using workflow builder there is no need to include the opening "triggers:" JSON markup notation, since it will be added automatically by workflow builder.

 

"change-state"

"publish-page"

"approve"

"reject"

"assign" and "unassign"

"set-expiration"

"clear-expiration"

"set-message"

"clean-messages"

"remove-restrictions"

"send-email"

Related Pages