3
 Followers
18
 Likes

Detect possible infinite loops in action flows and force the definition of max iterations

Service Studio
On our radar
As you all know infinite loops are great ways to slow down or even cause a non-responsive server.
Service Studio would detect circular flows (not with For Each) and force the user to define the max iterations allowed. If reached, it would trigger an exception.
user-made-loop detection
Created on 24 Jun 2010
Comments (5)
Well... detection of infinite loops is not attempted by any programming language. And for a good reason - it's an undecidable problem in computation theory. This means that it's an impossible task for any given computer.
Merged this idea with 'Warning on infinite loop' (created on 16 Jun 2015 14:10:50 by Igor Kirtak)
This is a stupid situation, but it happens sometimes. Say you have "if" block (in logic), which goes to one or several actions, and then should return to normal flow. But than you accidentally put the arrow so that it goes back to "if". Later when you notice problems you can spend hours trying to figure out what is wrong, depending on the side effects this creates. Debugger doesn't always help - I've been in the situation when there was DB update inside of one of nested actions, and debugger was just stuck on it, so it was not clear where is the problem.

Off course this is human factor, but would be great if Service Studio noticed such infinite loops and gave a warning about it. As a simple way, It might warn on any flow which returns to original "if", or, a little more complex - just the one that doesn't have modifications of the variables used in "if" (since there is no thing like "break" in Outsystems, there are only 2 ways of exiting such kind of loop: a change of "if" result and exception).


This comment was:
- originally posted on idea 'Warning on infinite loop' (created on 16 Jun 2015 by Igor Kirtak)
- merged to idea 'Detect possible infinite loops in action flows and force the definition of max iterations' on 06 Sep 2018 14:20:51 by Vasco Pessanha
Duplicate of:

http://www.outsystems.com/ideas/289/detect-possible-infinite-loops-in-action-flows-and-force-the-definition-of-max-it

And would be solved by implementing:

http://www.outsystems.com/ideas/1855/while-loop-in-actions
http://www.outsystems.com/ideas/173/new-improved-action-tools
http://www.outsystems.com/ideas/965/for
http://www.outsystems.com/ideas/730/enhanced-for-each
http://www.outsystems.com/ideas/1141/exit-loop
http://www.outsystems.com/ideas/776/add-break-continue-on-cycles

:(

J.Ja


This comment was:
- originally posted on idea 'Warning on infinite loop' (created on 16 Jun 2015 by Igor Kirtak)
- merged to idea 'Detect possible infinite loops in action flows and force the definition of max iterations' on 06 Sep 2018 14:20:51 by Vasco Pessanha
Detection of infinite loops is pretty tough...

This comment was:
- originally posted on idea 'Warning on infinite loop' (created on 16 Jun 2015 by Igor Kirtak)
- merged to idea 'Detect possible infinite loops in action flows and force the definition of max iterations' on 06 Sep 2018 14:20:51 by Vasco Pessanha
views
503
Followers
3