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

"For Each" function including a "Approval" step is stopping the loop until the approval is made

jonathangilbert
Kilo Sage

Morning

 

I am having an issue in flow designer where I am trying to create multiple "Catalog Tasks"  using a "for each" which also has an approval step, but the for each loop doesnt continue until the first catalog task is approved. What I would like is for all the catalog tasks to be created at the same time along with their approval requests. A run in parallel action would not work as the number of catalog task to be generated can vary depending on how many options have been selected by the user.

This is my scenerio, the user selects the SAP environments they require on the portal form (each one is a checkbox, so you can have 1 or many selected)

jonathangilbert_0-1707906208914.png

My sub flow then looks up the RITM and then looks up the options selected (ACTION 2 in flow below). For each record that meets the condition of beign "true", i want the flow to create the  Catalog Tasks all at the same time  and then request approval on that catalog task, as approvers vary depending on the environment selected. But as it stands the second task is not created until the first is approved.

jonathangilbert_1-1707906494704.png

Any ideas on how to build the flow to get it to provide what I require?

Many Thanks in advance

2 REPLIES 2

Mark Manders
Mega Patron

My PDI is waking up, so I didn't try, but what if you do another 'for each' on the catalog tasks (create approval for each task).


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Amit Verma
Kilo Patron
Kilo Patron

Hi @jonathangilbert 

 

Below posts could be helpful :

https://www.servicenow.com/community/itsm-forum/how-to-return-to-a-previous-step-flow-designer/td-p/...

https://www.servicenow.com/community/developer-forum/flow-requested-item-loop-back-to-previous-step-...

 

Give it a shot with Do-While Flow logic.

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.