Issue in approval

Venky Kshatriy2
Tera Contributor

Hi Team,

 

I am sending two approval's parallel to request item by using the flow designer(Do the fallowing parallel). Now I approved one approval, automatically second one going to the no longer required how to fix this kind of issue

VenkyKshatriy2_0-1726564667160.png

Advance thanks Team.

3 REPLIES 3

Eshwar Reddy
Kilo Sage

Hi @Venky Kshatriy2

My requirement was to create parallel approvals on the basis of a list collector catalog variable. In other words, add a user to multiple groups and ask for approval from each of the group managers separately.
Unfortunately parallel approvals are not supported by flow designer. You might find some solutions by creating a catalog task and tick the „wait” box or use the „run in parallel” options, but with foreach these don’t work.

 

I managed to find one solution and share it with the community, maybe it’ll be useful for someone.

 

  1. I created a new script action that takes the records from the foreach action and add individual approvals one by one.

pandu5_0-1726566641686.png

 

(function execute(inputs, outputs) {

  var approvalGR = new GlideRecord("sysapproval_approver");
	approvalGR.initialize();
  	approvalGR.source_table = 'sc_req_item';
	approvalGR.document_id = inputs.ritm;
	approvalGR.sysapproval = inputs.ritm;
     approvalGR.approval_column ="approval";
    approvalGR.approval_journal_column ="approval_history";
	approvalGR.approver = inputs.manager;
	approvalGR.state = "requested";
	approvalGR.insert();  
   
})(inputs, outputs);

2. Step 1 will create the parallel approvals, however the flow does not wait for the approval, so we need to look the approvals up OUTSIDE of the foreach loop

3. Then iterate through the approvals and

4. Add a wait for condition

 

pandu5_1-1726566641687.png


f

Certainly! Here’s a framed version of the sentence:

For assistance with your issue, please refer to the link below.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0994747

 

 

Please mark this response as Correct and Helpful if it helps you can mark more that one reply as accepted solution

 

seethapathy
Giga Guru

Hi @Venky Kshatriy2  

Can you check the "Ask for Approval" action is in Any Approves or Rejects if it is you can change it to "All users Approve or Reject" If it is Helpful Mark it as helpful