Need help with Parallel approval in flow design

Sohini Kar
Tera Expert

I need help with Parallel approval in flow design.

Requirement:

Create a request to provide access to folder path.

Suppose we are asking for access for 4 different path, It will go for 4 different approval.

If 1 is rejected. That path should go to different variable name: Rejected folder

and for rest 3, task should be created.

 

How can I achieve this with Flow designer.

In my case it is going for approval one by one. And if 1 is rejected then whole RITM is becoming closed incomplete.

1 ACCEPTED SOLUTION

Sohini Kar
Tera Expert

I have fixed the issue in an easier way. 

Instead of "Ask for approval", I simply updated record in "Approval table"

 

SohiniKar_0-1742747976707.png

 

 

No coding was needed and approvals were generated for each folder path.

View solution in original post

6 REPLIES 6

J Siva
Tera Sage

Hi @Sohini Kar 

Parallel approval cannot be achieved using a single flow. To implement this, you need to create parent and child catalog items along with corresponding flows.

Below is the community response I provided for a similar requirement. PFB


https://www.servicenow.com/community/developer-forum/servicenow-flow-designer-approvals/m-p/3207671/...


Let me know if you have any queries.
Regards,
Siva

Hi, It wont work as the number of approval is not limited.

The approval is coming from a List collector Variable. So user can add as many path as they want from the table, and for each path, each approval will go.

 

I got a similar workflow script. But I am unable to write the similar workflow script in Flow design.

 

Here is the script:

 

var util = new FNC_MassFileDirectoryUtil();

var folder = JSON.parse(current.variables.mass_folder_selection);
var folderArray = [];
folder.forEach(function(fd) {
    folderArray.push(fd.folder);
});

workflow.scratchpad.approvalMap = util.createApprovals(folderArray, current.sys_id.toString());
 
I do not know the work around of Workflow.scratchpad. I am new in flowdesign

Ankur Bawiskar
Tera Patron
Tera Patron

@Sohini Kar 

parallel approvals are always challenging in flow, but here is the workaround. it uses Do the following in Parallel

Parallel Approvals in Flow Designer 

sharing 1 more link

Parallel approvals in flow designer - proposed solution 

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

Hi, It wont work as the number of approval is not limited.

The approval is coming from a List collector Variable. So user can add as many path as they want from the table, and for each path, each approval will go.

 

I got a similar workflow script. But I am unable to write the similar workflow script in Flow design.

 

Here is the script:

 

var util = new FNC_MassFileDirectoryUtil();

var folder = JSON.parse(current.variables.mass_folder_selection);
var folderArray = [];
folder.forEach(function(fd) {
    folderArray.push(fd.folder);
});

workflow.scratchpad.approvalMap = util.createApprovals(folderArray, current.sys_id.toString());
 
I do not know the work around of Workflow.scratchpad. I am new in flowdesign