Hi,
I'm configuring Comala Document Management and I want the document owner to be notified if the document is rejected. Here's my script, I've tried a number of things (like stating the actual email or updating the email permissions of the approver) but it does not work. Not email. The other thing I noticed is, although stated in the script, that if the document is rejected it does not automatically change to the review state. Can anyone help with this?
Script:
{
"name": "Approval Workflow KMS with Message - Draft",
"id": "custom",
"description": "A simple workflow for Draft/Review/Approved/Rejected content in the draft workspace",
"HTMLdescription": "A simple workflow for Draft/Review/Approved/Rejected content. The initial state of the page is Draft. If the document is reviewed and approved, it transitions to the Approved state. If it's rejected, it goes to the Rejected state.",
"states": [
{
"name": "Draft",
"transitions": {
"select": [
"Review"
]
},
"colour": "#FFAB00",
"approvals": []
},
{
"name": "Review",
"colour": "#0052CC",
"taskable": true,
"transitions": {
"approved": "Approved",
"rejected": "Rejected"
},
"approvals": [
{
"name": "Approval",
"preassignedUsers": {
"items": [
"712020:7477d2ed-2672-4b5b-90df-25b2e82eb7d6"
]
},
"minimum": 1
}
]
},
{
"name": "Approved",
"transitions": {
"Published": "Published"
},
"colour": "#4a6785",
"final": false,
"versionsCompleted": false
},
{
"name": "Rejected",
"transitions": {
"Review": "Review"
},
"colour": "#FF5630",
"approvals": [],
"triggers": [
{
"event": "on-reject",
"actions": [
{
"action": "send-email",
"recipients": [
"@creator"
],
"notification": {
"subject": "${content.title} has been rejected",
"title": "${content.title} has been rejected by the approver",
"body": "Hello, ${content.link} in the ${content.space} space has been rejected and needs to be reviewed. Please resolve any comments added by the approver and re-submit the document."
}
},
{
"action": "set-message",
"type": "info",
"title": "Rejected",
"body": "The page has been rejected",
"tags": "state",
"mode": "autoClose"
}
]
}
]
}
]
}