Group Approvals in Flow Designer missing 'an approval from each group' option?

mcorl
Tera Expert

Hey gang!

TL;DR - Flow Designer does not appear to have functionality to accept a single approver from each group. It's either every approver from every group or a single approver from any group.

Customer requirements are typically satisfied by a single approval from each group when it comes to group approvals in a workflow. If they have four approval groups, it's typically not desirable for only a single approval to come from a single group. A single rejection from any group is a different story, but at least one approval from each group is the most common requirement I see. Now, everybody's favorite classic workflow editor had no problem dealing with this requirement and has a couple options. One was 'An approval from each group' and 'First response from each group'.

Flow Designer appears to be devoid of such options. In the lone 'Ask for Approval' action, there is indeed a setting to determine "when" to Approve. Let's take a look at those options:

Anyone approves = A single approval from any number of approvers is all that is needed to satisfy this approval.
All users approve = Every single standalone approver and group member needs to approve to satisfy this approval.
% of users approve = A provided percentage of user approvals is needed to satisfy this approval.
# of user approveA provided number of user approvals is needed to satisfy this approval.

Clearly, none of the above options allow a single user from each group to approve and satisfy the approval.

The one option I did NOT mention above is All responded and anyone approves. This would appear to be the closest choice for what I'm looking for and tends to make one believe it satisfies the approval by translating to 'At least one person from each group needs to respond and approve before we're good'. Unfortunately, it does not work that way.

In the screenshot below, you can see my configuration.

  1. I am pulling in multiple users from a table and requiring ALL of them to approve, which works fine.
  2. I am requiring ALL manual approvers to approve, which works fine.
  3. I am pulling in multiple groups (that contain 2 or more users each) and asking for a response from all groups with anyone approving, which does NOT work. It waits for all the other approvals, including every group member to approve before considering the Approval action 'approved'.
    1. I would expect this to set the remaining group members to No Longer Required after the 1st approval for that group was submitted. That doesn't happen.
    2. That does happen when I set it to Anyone approves. Then once a member from ANY group approves, it sets ALL groups to approved and ALL other members from ALL groups to No Longer Required.

 

find_real_file.png

I was considering opening a support ticket for this, but was hesitant since there doesn't appear to be another person in the entire ServiceNow ecosystem who has asked this question (or at least none I could find). Typically when I can't find anyone else having my issue, it means I'm overlooking something or unaware of some type of functionality. I find it hard to believe no one else has seen this and that I'm the first person to ask, but I guess it's possible. It's also possible this is a bug in Flow Designer and I will need to submit a support ticket.

Regardless, I apologize for the verbose post and look forward to your feedback!! 

 

1 ACCEPTED SOLUTION

mcorl
Tera Expert

Howdy gang!

**Update

This still does not work in Flow Designer the way it does in Workflow Editor. I even tried to create a legacy subflow to handle the group approvals to run in parallel with the other approvals and that didn't work either. So my solution was to handle ALL the approvals in a good old fashioned Approval Coordinator. Everything works as expected now and I just wait for the coordinator to return a result and process that result back in Flow Designer.

Seems like such a common thing. I'm mystified why Flow Designer can't handle the first approval from each dynamic group declared in an array. Maybe in San Diego or Tokyo...

View solution in original post

19 REPLIES 19

Satish16
Tera Contributor

Hi Mcorl,

Agree with you very common thing on the Group approval is missing.

Had a similar requirement, and I think was able to overcome this issue by looping group approvals as screen shot attached.

Disadvantage: Not all group approvals get triggered at the same time, it has to go one by one though.

Note: The attached workflow is just work-in-progress, still some testing is pending. But thought will share my experience, hope this helps?

 

Cheers

S

Luk__ Kn__ek
Tera Contributor

For multiple groups approval, you can use multiple "Anyone approves" in an OR condition. Connected to one "Anyone rejects" containing all groups needed.

find_real_file.png

For dynamic group approvals, check runtime value of flow context of the above and script the approval condition to return a string like:

ApprovesAnyG[groupSysID1]&AnyG[groupSysID2]&AnyG[groupSysID3]OrRejectsAnyG[groupSysID3]

find_real_file.png

nyancer3
Tera Expert

Hi @mcorl ,

 

You should be able to accomplish this by using a script in the "Rules" as follows.

  1. Start the approval string with "Approves"
  2. For each group you need to get approval from, append the following:
    1. If this is NOT the first group in the list, "&"
    2. "AnyG[" + sys_id of the group + "]"
  3. If you want a rejection from anyone to reject, then add "OrRejectsAnyG[" + comma-separated list of the group sys_ids + "]"

The end result should look like this:
ApprovesAnyG[sys_id_1]&AnyG[sys_id_2]...&AnyG[sys_id_n]OrRejectsAnyG[sys_id_1,sys_id_2,...sys_id_n]

Hope that helps!

Jose Manuel
Tera Contributor

Good morning @mcorl ,

 

I found a way to achieve the "First response from each group" condition.

 

The action configuration:

JoseManuel_0-1705939683062.png

You need to specify rules by script.

Script:

JoseManuel_1-1705939722867.png

return "Approves1#G[groupid]&1#G[groupid]";

 

If you would like it dynamic, you can get your groups' ids before and concatenate them.

 

An example:

JoseManuel_2-1705939852834.png

 

In this case, my groups were saved in a glide_list field.

Results:

JoseManuel_3-1705939917538.png

 

Hi Jose Manuel,

 

It really works for approval, how can we achieve it for rejection like anyone rejects irrespective of group , the request should reject as per the above example its the same way for rejection as well, each member in group has to reject it but we need only one rejection, please let me know if you have implimented this.

 

thanks in advance