Multiple groups approval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2018 01:11 AM
Hello,
I´m trying to make a multiple approval for changes. Oour client will have many groups with different roles. In some change requests they would need the approval from many groups in order to implement the chance. For doing so, i created a list field where they can pick from all the gorups available as shown in the image
In the workflow, I modified the module "Approval - Group" and in the approvers option i have the following script to get all the groups that the user selected:
I also set the condition for approval as the following:
But when I make a change request, the workflow doesn´t wait for an approval from each group as it should. Right now when some one approves the change, It moves to the next state and I don´t know why it is happening if it should wait for an approval from each group.
Am I doing something wrong? Or how should i do this instead?
Thanks for your help.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2018 02:14 AM
change to below. A list field already stores a comma separated list of sys_id's so there's no need to split it.
var answer = current.getValue('u_many_assignment_groups');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2018 02:14 AM
Hi,
Approvals are getting generated or not?
Try using answer.push('group name');
Thanks,
Ashutosh Munot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2018 04:27 AM
Yes, approvals are generated, but when one person approves the change, it goes do tha next state but it shouldn´t. It should wait for the approval from the other members of the other groups.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2018 05:43 AM
I replicated this on my dev instance and approvals weren't generated when .split(',') was included so please confirm the approvals are correctly being added from this approval activity.
Also, confirm that all groups included have active users in them.