0

Can infinite loop happen in a once time scheduled flow? I'm running a test in sandbox. The conditions are pretty narrow. It must have a "Test Record" checkbox equals to TRUE and it has to be created in the same day. There are only two records in my collection set, but I received over 20K emails to my inbox.

Is infinite loop possible in Flow, how do I prevent this? Thanks

enter image description here

enter image description here

enter image description here

1
  • Hi. Please edit your question and attach screenshots of the flow, and explicitly show the initiation conditions (and how they are applied - every time or only on update to meet the conditions) and any details of assignment steps (for example). The behaviour you see will entirely depend on these sorts of points. – Phil W Mar 8 at 7:53
0

It is infinite element means check your decision box, you have looped collection elements , but you have to loop the current element , this will stop infinite action in loop

0

In theory, you could build an infinite loop in Flows (although not the way you've built yours). The idea is that at the "end" of the Flow, you add a pause/wait, and then on resume, continue back at the beginning of the flow.

I do NOT recommend this.

In practice, you will eventually (and rather quickly in some cases) run into a limit. Every time a Flow pauses, it deserializes the state of the Flow and saves it to the database, so that upon resume, it can serialize that state and resume execution. The size of this deserialized state will grow and grow upon each pause, and there is a limit to the size of the deserialized state that can be saved to the database upon Pause. Eventually, the Flow will fail because of this limit.

Why can't you schedule this Flow to occur at intervals? This has the effect of infinite loops, but occurs at a predefined time.

If your needs are to be more granular than the Once-a-day scheduling capability of Scheduled Flows, then you'll need to move to Scheduled Apex, where you'll have more granular scheduling options.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.