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

Flow Designer - Do the following until loop in Sub Flow is not ending

PavelP
Mega Sage

Hello,

I encountered an issue with Flow, I managed to get a functionality working within the loop, but when the record is closed - and the condition in the "Do following until" loop should be fulfilled - the sub-flow still sits in the "Waiting" state.

PavelP_0-1721980113425.png

 

Im not sure how to troubleshoot this since the configuration is being set as expected. The only specific is its ran in subflow, but the record in the input is working with other conditions just fine.

Any suggestions?
Thanks

Pavel

1 ACCEPTED SOLUTION

Thanks,

I ended up using something similar - put in a Parallel line with a "Wait for" condition, that also checked the states in case the case is closed - ending the flow if fulfilled.

PavelP_0-1722262860943.png

Thanks a lot for all your support 🙂

 

View solution in original post

11 REPLIES 11

Hi,

if I do so, it will show its stuck on the "Wait for Condition" - which is part of the loop inside - but I'm confused - I thought if the "Do the following until" condition happens - the loop is automatically canceled.

PavelP_0-1721996184823.png

 

Are you saying that if I want to close the loop, all of the conditions of the run must be completed?

Thanks

Pavel

Hi Pavel

Yes, inside doWhile there are wait conditions.

Once your while condition is true then steps 2-6 execute and then moves to next row


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Okay, in that case I have a question:

If I want to be able to close the loop, while still have the conditions inside running - would it be possible to create a parallel workflow inside the "Do the following" loop, and then Record would be closed, the Flow would be completed - even though the conditions inside are still waiting?

Thanks

That won't work, Steps Inside do-while should be completed to move to next row.

 

Can you explain your requirement,Maybe we can provide more details.

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Requirement is following: Within a workflow of a record, the record can be moved from "Reviewed" state to "Submit" state, in case its Returned. After move like this, if the record is updated, the state should be moved to "Pending Review" state directly (and skip the "Approval" states, that it would go through otherwise.

The return can happen multiple times - that's why the loop is being used.

We tried using a Business Rule, but it was creating conflict with flow when creating the record, so we needed to use different solution.

 

My desire was: using the loop to facilitate the "Return" functionality, but to break the loop the moment the Record is closed-deactivated.