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

Could you not feed the list of groups into a single instance of the sub-workflow rather than a workflow instance per group?


Did you ever end up resolving this?

Hi Maik,

i trust this msg finds you well. I wonder if you could help me here.

I have a catalogue item where users select in a list collector one or more business applications.

As part of the flow, the RITM must be approved by a fixed group and the portfolio manager group for each business application selected. One person for each group must approve and any rejection will cancel the request.

Since i am new to flow i created an action "Ask for approval" containing the following script.

var answer = [];
var approvers = 'a7923e8edbe429103985be43f3961941';

//search for managed by group of business applications
var app = fd_data.trigger.request_item.variables.business_applications_affected.toString();
    //search for application managed by group
    var gr = new GlideRecord('cmdb_ci_business_app');
    gr.addQuery('sys_id','IN', app);
    gr.query();
    while(gr.next()){
        if(gr.managed_by_group!=''){
            approvers=approvers+','+gr.managed_by_group;
        } else {
            if(gr.managed_by_group=='') {
               approvers=approvers+','+gr.application_manager;
            }
        }
    }
//}
return "ApprovesAnyG["+approvers+"]OrRejectsAnyU["+approvers+]";

The script above adds all approvers and group approvals but if a member of a group approves the other members of the same group are not set to "no longer required". Also, if a person rejects the request, none of the other approvers are set to "no longer required".
 
would u know why or how should i do this?
 
regards,
Max

 

Michael Leone
Tera Guru

I'm facing the same issue as well.

 

I have a form with a Multi Row Variable set that allows users to select multiple areas they require access to.

 

I then use flow designer to loop through and lookup the area they require access to and shoot an approval to the area owner (using a sub flow).

 

This works great but if the user selects 2 areas it sets the second approval to no longer required.

 

Anyone know if ServiceNow are going to fix this as it works perfectly in Workflow editor.

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...

I just noticed this in my subscribed threads and wanted to touch base.

 

I logged this as a I ticket last year and was advised that this was a know error that would be fixed in Utah.  They let me know that it was due to the way the approval engine was written and it wasn't going to be back ported.

 

I'm going to test this out tomorrow and report back.

 

I ended up skating around. The approval by braking my item up into a parent item with multiple child items for each item that required a separate approval.  I found this to be a better solution as the approval record has more meaningful data.