- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2016 09:10 PM
Hi Guys,
I have a requirement where there will be concurrent and consecutive approvals. My workflow works fine when approved because I used join activity for approvals. However, when one of the approvers reject the ritm request, all the pending approvals need to be cancelled. At the moment, they are still remaining as requested. Can you check the below workflow and see if you can point out anything that I am missing:
Mussie
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2016 08:08 PM
Hi Guys,
Thanks for your help, this is now resolved. I used a 'run script' to set the records to 'rejected' and this seem to have resolved the issue. I initially made the mistake of setting the records to cancelled but it looks like when the records are set to cancelled the approval were still active and giving me some unpredictable results.
Run Script - Cancel Pending Approvals
var gr = new GlideRecord ('sysapproval_approver');
gr.addQuery ('sysapproval', current.sys_id);
gr.addQuery('state', 'requested');
gr.query();
while (gr.next()){
gr.state = 'rejected';
gr.update();
}
Mussie

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2016 10:29 PM
Hi Mussie,
I think the workflow is working as expected. By branching the 2 approvals you are making them independent of each other. But it sounds like your requirements is to set it so that if 1 is rejected, then the Request is rejected and the other approvals should be cancelled or something. It sounds like you need to combine the Approvals into one Activity, list both Users or Groups, and set Wait for to Everyone to approve.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2016 10:59 PM
You might try to use an approval coordinator and add all the approval activities inside it. Control the approval and rejection logic using the approval coordinator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2016 05:29 PM
Hi Guys,
Adding approval coordinator isn't working for me. This is probably because some of my approval are concurrent and some of them are consecutive. Any other ideas?Mussie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2016 08:08 PM
Hi Guys,
Thanks for your help, this is now resolved. I used a 'run script' to set the records to 'rejected' and this seem to have resolved the issue. I initially made the mistake of setting the records to cancelled but it looks like when the records are set to cancelled the approval were still active and giving me some unpredictable results.
Run Script - Cancel Pending Approvals
var gr = new GlideRecord ('sysapproval_approver');
gr.addQuery ('sysapproval', current.sys_id);
gr.addQuery('state', 'requested');
gr.query();
while (gr.next()){
gr.state = 'rejected';
gr.update();
}
Mussie