Flow Designer - Need to run catalog task in loop

abhishekrav
Tera Contributor

I have a Requirement that , If a the approver approves the request and moves into if condition.

- A new catalog task is created for procurement of the device.

- After completion of that task , new catalog task is created to configure the device.

My requirement is:

- In configuration task If the device is damaged or not in state to use so we need to create a new return task and start the loop of procurement again for max 3 times.

 

I have attached the screenshot of the flow design. Please let me know your approach to the problem. 

5 REPLIES 5

Mark Manders
Mega Patron

How are you handling the configuration task when a device is damaged? Do you have a 'damaged' field on it? Or some other way of identifying? You can use the flow logic of 'do the following until'. Since you only want to do it 3 times, you will need a variable to update the number of loops to. As soon as the task is set to 'damaged', you update the variable, do a check if it's on 3 and start again.


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

Damaged will be the reason to close the task,  So after changing the state to closed incomplete (in configuration) we should create a new return task to return the item and start the loop of procurement again.  

 

with do the following until task the problem is , I have to add until condition as "configuration task to closed complete and procurement also closed complete" ,  but the problem is,  the configuration task is in if condition so i am not able to take the state as a condition for until .

Mark Roethof
Tera Patron
Tera Patron

You could mimic a loop for example by applying the Go Back To action + adding a Variable to store how many times looping is allowed. Shouldn't be more than a few minutes work to setup.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

VeereshA
Tera Contributor

Hi Abhishek,
i have created the flow for your reference this should help to resolve your issue
you need have 'Damage" field over catalog task and add "Count"  flow variable. on iteration just increment the count.

VeereshA_1-1721992188624.png

Thanks,

Veeresh