Multiple groups approval

luisfer
Kilo Contributor

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 

find_real_file.png

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: 

find_real_file.png

I also set the condition for approval as the following: 

find_real_file.png

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. 

 

4 REPLIES 4

Dubz
Mega Sage

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');

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

 

Approvals are getting generated or not?

 

Try using answer.push('group name');


Thanks,
Ashutosh Munot

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. 

 

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.