Flow Designer - Need to run catalog task in loop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2024 11:52 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2024 12:15 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2024 01:39 AM
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 as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2024 01:49 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2024 04:10 AM
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.
Thanks,
Veeresh