Multiple JSON Triggers in a custom workflow

Overview

You can use one or more JSON triggers in a Comala Document Management workflow.

Using JSON triggers to create a custom email notification for different state changes

In our custom workflow, we have added three triggers.

Each trigger looks for a different change of state event.

Trigger One

On a change of state to QM - In Review

{"event": "on-change-state", "conditions": [ {"state": "QM - In Review"}

 

There are two "actions:"

  • an email is sent to the users who have been added as a value to the workflow parameter @QT@

  • an informative message dialog is shown

Trigger Two

On a change of state to QM - In Approval

{"event": "on-change-state", "conditions": [ {"state": "QM - In Approval"}

 

 There are two "actions:"

  • an email is sent to

    • the users who have been added as a value for the workflow parameter @QT@

    • the users who are members of the Confluence user groups added as a value for the workflow parameter @QM@

  • an informative message dialog is shown

Trigger Three

On a change of state to QM - Published

{"event": "on-change-state", "conditions": [ {"state": "QM - Published"}

 

There are two "actions:"

  • an email is sent to the user who created the page using the value reference @Creator@

  • an informative message dialog is shown

Here's the JSON notation in full for these three workflow triggers.

 Only one overall "triggers": notation will be required in the JSON code if added to a workflow using the JSON editor.

In the JSON markup multiple trigger events are enclosed in a single pair of "[" and "]" brackets prefaced by a single "triggers": JSON element.

You can add the JSON to the workflow in workflow builder.

 There is no need to add the opening "triggers": JSON when adding the JSON code to workflow builder. Workflow builder will automatically add this when you save the changes to the workflow.

Related Pages

User Guide

Reviewing Content

Add a JSON trigger using workflow builder

Notifications