The CreatorCon Call for Content is officially open! Get started here.

Parallel Group Approvals from List Collector in Flow Designer Not Working

LokeshwarRV
Tera Contributor

Hi everyone,

I'm working on a Service Catalog flow in Flow Designer triggered by a Requested Item (sc_req_item). Here i want to get the parallel approavls from the approval groups .I have a List Collector variable called related_services that stores multiple related services (cmdb_ci_service records). Each service has a reference to an approval group in the change_control field.

In my flow, I use a script to collect all the approval group sys_ids from the related services and pass them to the "Ask for Approval" action. Here's the script I'm using:

iam using  a flow variable name ApprovalList with script
var groups = [];
var relatedLists = fd_data._1__get_catalog_variables.related_services;
var serviceGr = new GlideRecord('cmdb_ci_service');
serviceGr.addQuery('sys_id', 'IN', relatedLists);
serviceGr.query();

while (serviceGr.next()) {
    var groupId = serviceGr.getValue('change_control'); // Get sys_id as string
    if (groups.indexOf(groupId) < 0) {
        groups.push(groupId);
    }
}

return groups;

and in Ask for Approval i am setting this
LokeshwarRV_0-1759728354828.png
LokeshwarRV_0-1759728689061.png

 

and i my flow execution i am getting as approval as skipped
Note:Here i want to sent the approval to approval groups parallel

 

Help me to overcome this issue
Thanks in Advance
 
 

 

 
 
 
 
 
 
1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@LokeshwarRV 

it's somewhat challenging when you use parallel approvals in flow

see these links for approach

Parallel Approvals in Flow Designer 

Parallel Approvals in Flow Designer 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader