Overview
The Content Expiry workflow and the Quality Management System workflowSystems workflows that are included with the app use workflow triggers.
...
Workflow triggers are used in the Content Expiry workflowand the Quality Management System workflowSystems workflows.
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
To view the workflow triggers in these workflows, you can duplicate the workflow in the document management dashboard and view the workflow copy in the visual editor or code editor.
Content Expiry Workflow trigger
This workflow has the following workflow trigger
Code Block |
---|
"triggers": [ { { "event": "on-expire", "actions": [ { { "action": "send-email", "recipients": ["@creator", "@watchers", "@lastUpdatedBy"], ], "notification": {{ "subject": "${content.title} has expired", "title": "${content.title} has expired", "body": "Hello, ${content.link} in the ${content.space} space has expired and needs to be reviewed" } }, { { "action": "set-message", "type": "info", "title": "Expired", "body": "The page has expired", "tags": "state", "mode": "autoClose"} ]} } ] } ] |
The workflow trigger listens for the state expiry event, and when this occurs
sends emails to the content watchers
displays an on-screen message when users view the page
...
The QMS Workflow has the following workflow trigger:
Code Block |
---|
"triggers":[ { "event": "on-change-state", "conditions": [ { { "state": "In Approval" } ], "actions": [ { { "action": "send-email", "recipients": [ "@document_user_reviewers@", "@document_group_reviewers@" ], "notification": {{ "subject": "${content.title} is In Approval State", "title": "${content.title} is In Approval State", "body": "Hello, ${content.link} in the ${content.space} space is in approval state and needs to be reviewed" } } ] ] } ] |
The trigger listens for the state change event with a condition limiting this to the transition to the In Approval state. When this event occurs
...
user(s) who are added as a Confluence
userID
value(s) for the workflow parametersdocument @document_users reviewers_reviewers@
users who are a member of the Confluence group(s) added as a Confluence group (
groupName
or groupID
) value(s) for the workflow parameterdocument @document_group reviewers_reviewers@
Related Pages
Multiple JSON Triggers in a custom workflow
...