Triggers that listen for workflow events can be added to a workflow. These triggers can be used to create actions, for example, custom notifications.

JSON triggers are used in the Content Expiry workflow and the Quality Management System workflow.

Comala Document Control triggers are created using JSON markup and can be added to a workflow using the workflow builder.

JSON trigger format requirements when adding to workflow builder

For example

JSON Trigger format for workflow builder
	{"event": "on-change-state",
		{"state": "Rejected"}
		{"action": "set-message",
			"type": "info",
			"title": "Hey My Wonderful design and Tech Team",
			"body": "We have some work to do ... it was rejected!!!"}

(info) Only one overall "triggers": will be required in the JSON code if added to a workflow using the JSON editor. In workflow builder you do not have to add the "triggers": JSON element.

Adding a JSON trigger using workflow builder

The trigger is added using the workflow editor.

In the space settings Document Control dashboard open workflow builder. The workflow builder will open for the current space workflow.

  • Choose the workflow name in the workflow panel to open the Edit Workflow panel

Example JSON triggers can be copied, pasted and edited to the Triggers dialogue box.

  • Expand the >Advanced tab.

  • Copy and paste the JSON trigger markup to the Triggers dialogue box.

  • Choose Apply to save the added JSON trigger.

  • Choose Save to update the workflow in workflow builder.

  • Choose Exit to return to the space settings and add the customized workflow to the dashboard as the current space workflow.

(info) You will need to edit/amend the workflow name to save these changes. Workflow builder does not allow bundled workflows to be amended. All edits will be saved as a (Copy) of the original workflow.

This example JSON trigger will

  • listen for a state change event - a reviewer choosing to reject the content and the workflow transitions to the Rejected state.

  • action a custom notification displaying an on-screen message for users who view the content

The on-screen message will be in addition to workflow notification confirming the rejection.

Related Pages

User Guide

Reviewing Content

Using Workflow Builder