# Workflow loop getting executed even with zero length input

**URL:** <https://developer.sailpoint.com/discuss/t/workflow-loop-getting-executed-even-with-zero-length-input/8216>\
**Category:** Bugs\
**Tags:** fixed, workflows\
**Created:** [February 14, 2023, 7:56am UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-getting-executed-even-with-zero-length-input/8216 "2023-02-14T07:56:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpatel](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@cpatel](https://developer.sailpoint.com/discuss/u/cpatel)\
**Post date:** [February 14, 2023, 7:56am UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-getting-executed-even-with-zero-length-input/8216/1 "2023-02-14T07:56:48Z")

</div>

I have noticed that workflow loop is getting executed even if there is no input to it. My use case is to get active accounts for inactive identities and disable them if there is any. Most of the time search query returns zero identities but loop still gets executed once with empty array.

Output of http request above workflow has empty array in body:

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/7/7f4a130c0204f0a5e4d99aa9d8af412f65542f6d.png)

and loop still says one successful execution.

on top of this I have found loop to be showing all execution as successful even if there are steps where it ends in “End Step - Failure”. Loop execution in testing never shows anything in that red number apart from zero.

@colin_mckibben FYI

> **Summary**
>
> This text will be hidden

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [February 14, 2023, 2:15pm UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-getting-executed-even-with-zero-length-input/8216/2 "2023-02-14T14:15:34Z")

</div>

Thank you for bringing this to our attention Chirag. Just to be clear, is this a good summary of your observations and expectations?

1. The loop operator is executing once when it is provided an empty array. The expectation is that is shouldn’t run at all and skip past the loop.
2. If a loop iteration encounters an “End Step - Failure” operator, it shows as a successfully completed iteration. The expectation is that it will show as a failed iteration.

---

<div class="post-metadata">

**Author:** ![cpatel](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@cpatel](https://developer.sailpoint.com/discuss/u/cpatel)\
**Post date:** [February 15, 2023, 4:26am UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-getting-executed-even-with-zero-length-input/8216/3 "2023-02-15T04:26:51Z")

</div>

> [@colin\_mckibben](#):
>
> r attention Chirag. J

Your observation and expectation are correct.

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [February 15, 2023, 1:46pm UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-getting-executed-even-with-zero-length-input/8216/4 "2023-02-15T13:46:27Z")

</div>

I have submitted tickets to engineering (PLTWRKFLW-1827). Thanks for bringing this to our attention.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 19, 2023, 2:24pm UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-getting-executed-even-with-zero-length-input/8216/5 "2023-07-19T14:24:19Z")

</div>

Closed on July 19, 2023, 2:24pm UTC



---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [January 6, 2025, 2:14pm UTC](https://developer.sailpoint.com/discuss/t/workflow-loop-getting-executed-even-with-zero-length-input/8216/6 "2025-01-06T14:14:56Z")

</div>

This issue has been fixed.
