Overview
One or more workflow triggers can be added to a workflow. Each trigger can be set to
- listen for a single workflow event such as a change of state (
on-change-state
event) - check that a set condition is met for the event such as the state is the final state in the workflow ("
final":true
condition) - and if the condition is met for the event, set one or more actions such as sending a custom email (
send-email
action)
Triggers are added to a workflow as JSON code. They can be added using workflow builder or the JSON editor.
JSON Triggers can be used to create a more flexible and responsive workflow in Comala Document Management for Cloud.
Example
In the example below
- the trigger listens for a change of state.
- the set condition constrains the trigger to listen for the state change to the Rejected state
- once this event occurs the trigger actions a change of state back to the Draft state
There are a range of workflow events including an approval event, a reviewer assignment/unassignment event that a trigger can be set to listen for.
You can constrain the event by adding a condition that the event is for a named state in the workflow ("state":"Draft"
), the final state ("final":true
) or the initial transition to a named state ("state":"Approved",
"initial":true
).
Trigger actions include
- changing the state (
"change-state", "state":"Draft"
) - assign/unassign users or Confluence groups as reviewers to an approval (
"assign","approval":"approvalname", "user":"userID"
/"unassign","approval":"approvalname","user":"userID"
) - approve or reject a content review (
"approve", "approval":"approvalname"
) - set a state expiration period (
"set-expiration", "duedate":"P1M")
- create a custom notification such as an email (
"send-email")
or on-screen message ("set-message")
- set or remove page level user permissions (
"set-restrictions"
and"remove-restrictions"
)†
† Only 'Confluence Cloud Standard, Premium and Enterprise Plans' enable customers to edit permissions, including global, space, and page permissions
Related pages
- JSON Trigger events
- JSON Trigger conditions
- JSON Trigger actions
- Users or groups within a trigger
- JSON Trigger examples
Adding a JSON Trigger using workflow builder