- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Everyone,
I have defined a Do the following until action in a flow where it runs until catalog task state is false. Inside the loop there is Wait for condition loop, catalog task state is false (with Timeout enabled for 24 hrs).
So even if the Until condition is never satisfied, the action started executing at 29/09/2025 with one day waiting period inside the loop could not have gone more than 62 loops until today. but the flow is throwing an error after the loop is executed for 1000 times having the Iteration limit reached.
Flow action :
Flow Execution error sample :
As per logic, the Do the following until loop started executing at 29/09/2025 could not have Iterated for more than 62 times (considering until today).
Are there any known errors with Do the following until action like while checking the until condition after going through an Iteration, even the state of task is made false, it not considering the updated value like that?
Any Insights into this is very much Appreciated. Thanks in Advance!!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Madhan007
People often think "Wait for Condition" means "Wait while this condition is true." It actually means "Wait until this condition becomes true.
The Scenario happening in your flow:
-
Iteration 1 starts: Flow looks at Catalog Task pill. Value: Active = True.
-
Wait Step: (Skipped in 58ms due to config issue mentioned above).
-
End of Loop (Until): Flow checks the Catalog Task pill.
-
Crucially: It is still looking at the snapshot of the task from when the flow started.
-
It sees Active = True.
-
Loop repeats.
-
-
Iteration 2 starts: Nothing has forced the Flow to refresh that data pill.
-
End of Loop: It checks the stale snapshot again. Active = True.
Because the "Wait" isn't pausing execution, this loop spins 1000 times in under a second, constantly checking a stale version of the record.
-
Do the Following Until...
**Look Up Record** (Table: SC Task, SysID: [Your Task SysID])
**This step forces ServiceNow to grab the latest status from the database.*
**Wait for a duration of time** (Duration: 1 Day)
**This replaces your "Wait for Condition". It guarantees the loop pauses for 24 hours, preventing the 1000-loop error.*
Your other logic: Get Variables, Set Flow Variables -
Until...
-
CRITICAL: In the condition here, do not use the pill from the Trigger/Create step.
-
Use the Record Pill from the "Look Up Record" step (Step 2) inside the loop.
-
Happy to help! If this resolved your issue, kindly mark it as the correct answer ✅ and Helpful and close the thread 🔒 so others can benefit too.
Warm Regards,
Deepak Sharma
Community Rising Star 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Madhan007
People often think "Wait for Condition" means "Wait while this condition is true." It actually means "Wait until this condition becomes true.
The Scenario happening in your flow:
-
Iteration 1 starts: Flow looks at Catalog Task pill. Value: Active = True.
-
Wait Step: (Skipped in 58ms due to config issue mentioned above).
-
End of Loop (Until): Flow checks the Catalog Task pill.
-
Crucially: It is still looking at the snapshot of the task from when the flow started.
-
It sees Active = True.
-
Loop repeats.
-
-
Iteration 2 starts: Nothing has forced the Flow to refresh that data pill.
-
End of Loop: It checks the stale snapshot again. Active = True.
Because the "Wait" isn't pausing execution, this loop spins 1000 times in under a second, constantly checking a stale version of the record.
-
Do the Following Until...
**Look Up Record** (Table: SC Task, SysID: [Your Task SysID])
**This step forces ServiceNow to grab the latest status from the database.*
**Wait for a duration of time** (Duration: 1 Day)
**This replaces your "Wait for Condition". It guarantees the loop pauses for 24 hours, preventing the 1000-loop error.*
Your other logic: Get Variables, Set Flow Variables -
Until...
-
CRITICAL: In the condition here, do not use the pill from the Trigger/Create step.
-
Use the Record Pill from the "Look Up Record" step (Step 2) inside the loop.
-
Happy to help! If this resolved your issue, kindly mark it as the correct answer ✅ and Helpful and close the thread 🔒 so others can benefit too.
Warm Regards,
Deepak Sharma
Community Rising Star 2025