Feature request? Setting a limit for loop iterations and recursion depth
Posted by Maciej Arciuch on Dec 15, 2009; 2:39pm
URL: https://discuss.orbeon.com/Feature-request-Setting-a-limit-for-loop-iterations-and-recursion-depth-tp964356.html
Hi,
is it possible to somehow limit the number of loop iterations and recursion depths in Orbeon? The system I'm maintaining is sort of a FormRunner, but anyone can register and publish a form. Unfortunately, people make mistakes which sometimes lead to infinite loops, which are highly undesired ;).
I know that you track the iteration number, because you present it in the logs:
DEBUG XFormsServer - XForms - action - executing {action name: "action", while iteration: "1"}
... (two weeks later)
DEBUG XFormsServer - XForms - action - executing {action name: "action", while iteration: "595204784"}
...
You probably keep the recursion depth as well, because you indent the log message appropiately:
DEBUG XFormsServer - XForms - action1 - executing {...}
DEBUG XFormsServer - XForms - action2 - executing {...}
...
DEBUG XFormsServer - XForms - actionN - executing {...}
Is there any configuration option that would let the Orbeon administrator to simply end the processing of invalid forms after, say, N iterations or at recursion depth M? If not, would you accept this a feature request or guide me on how to implement it?
Best regards, Maciej Arciuch