Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Overview
...
One or more workflow triggers can be added to a custom workflow to listen for a workflow event. These triggers can be used to
...
undertake actions,
...
such as sending a custom notification.
Comala Document Management workflow triggers are
...
added to a custom workflow using the workflow builder visual editor
...
.
Info |
---|
The code editor supports reducing errors when writing JSON code. It includes autocomplete features and JSON dropdown options to add properties, values, and data, including trigger events, conditions, and actions. |
Example Trigger notation
Code Block |
---|
"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!!!"}
]}
] |
Info |
---|
If added to a workflow using the code editor, only one overall " |
Adding a trigger using the visual editor
The trigger JSON code is added using the workflow builder visual editor.
Open workflow builder in the app space settings:
choose Edit Workflow
select Use Visual Editor in the Actions menu
In the workflow builder visual editor
choose the workflow name in the workflow panel to open the Edit Workflow panel
expand the Advanced tab in the Edit Workflow panel
add the JSON code trigger markup to the Triggers dialog box
Do not add the opening JSON "triggers":
notation when adding the JSON trigger. This is automatically added to the workflow JSON template when saving the workflow.
choose Apply to save the added JSON code trigger
choose Save to update the workflow
choose Exit to return to the app space settings
The custom workflow is updated in the app space settings.
Trigger validation
The visual editor validates the added JSON code
checks the JSON format
checks inconsistencies in the trigger with the workflow, for example, in referenced state names
An error in the JSON code format or an inconsistency with the workflow prevents the trigger from being applied in the visual editor or saved to the workflow in the app space settings.
If the format check fails
a Wrong format breadcrumb is displayed after adding the trigger to the dialog box
the Apply option is disabled
Info |
---|
Format validation errors can be caused by unrecognized characters (such as parentheses characters) or a missing paired bracket in the JSON code. |
If there is an inconsistency with the workflow, a validation error message is displayed when using Save in the visual editor.
The validation error can be caused by the trigger using a state name that is not in the workflow. Validation fails, for example, if the name of the workflow element (state, approval) includes differences such as lower or uppercase characters or is not present in the workflow.
See the following for further details of these validation checks:
Filter by label (Content by label) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Elements of the custom message notification trigger
In this example, the added trigger will
Listen for a state change event to the named state in the event condition - the Rejected state
For example, a reviewer choosing to reject the content causes a workflow approval transition to the Rejected state.
Action a custom notification once the event occurs, displaying an on-screen message for users who view the content
...
Related Pages
...
An event for the trigger to listen for is selected using the dropdown menu. An optional event condition can also be selected using a dropdown menu. One or more actions for the trigger are added using the Add Action dialog box.
Triggers added to the workflow are displayed in the workflow panel in the visual editor.
...
Add a workflow trigger
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
To add a workflow trigger to a custom workflow, in the app space settings
open workflow builder visual editor for the custom workflow
...
open the trigger editor by choosing either
Add Trigger in the left-hand workflow panel
the + Trigger button in the right-hand navigator panel
...
Event
The trigger only listens for a single event.
select a single event for the trigger using the Event dropdown menu
...
Info |
---|
Scroll down to view the available workflow trigger events. |
Condition
One condition for the event can be added. Adding a condition is optional.
if required, add an event condition using the Condition dropdown menu
...
When adding the State condition, you must add the value of the workflow state. A workflow state for the current workflow is selected using the dropdown menu option.
...
The Is Initial State and Is Final State are each a condition with a boolean value of true or false.
...
Actions
A workflow trigger must have at least one action undertaken when the event occurs and any set condition is met.
You can add one or more trigger actions using the Add Action option.
choose Add Action to open a dialog box to select a trigger action
...
select a trigger action using the Actions dropdown menu
...
Info |
---|
Some actions, such as Set Message and Send Email, include mandatory parameters that must be specified for the action to function correctly. These parameters are configured using the dialog box. |
add any parameter values for the action
...
Mandatory parameters are marked with a red asterisk *. To add the action to the workflow trigger, you must add the values for these parameters.
add the values for any parameters
...
choose Add to include the action in the workflow trigger
...
Info |
---|
If required, choose Add Action to add more actions for the trigger. |
choose Add to add the trigger to the workflow
...
You can view the JSON code for the added trigger by toggling from the visual editor to the code editor.
...
Editing a trigger
A trigger can be edited to change the event, condition, or add or remove actions.
select the trigger in the workflow panel to open the Edit trigger dialog box
...
For example, the On state changed trigger listening for the change to the Approved state.
...
In the above trigger, additional actions have been added:
Clean Messages
Remove Restrictions
Actions are executed in the listed order.
You can drag each action to change the order of the actions in the list.
...
You can highlight an added action and choose X to remove it from the trigger.
...
Adding multiple triggers
Choose +Triggers to open the trigger editor to add an additional trigger to listen for a different event or event and condition.
...
This workflow trigger actions a change of state on a reviewer rejected decision. When there are multiple approvers, the trigger fast-tracks a rejected decision from a single reviewer.
All workflow triggers added to a workflow are displayed in the workflow panel.
...
Related Pages
Child pages (Children Display) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|