I've built a small workflow that iterates through an xml object and converts part of it into a string which will become a simple html file. The iteration is done by using a for loop.
The workflow stops during execution and the scriptable task is highlighted red, but no exception is thrown.
I've checked the server.log for details and there I have found:
4-cde3-4e09-bd44-14b5f7106c61]} [WorkflowHandler] Error in execution of workflow 'WFNAME for wfExecution[8abe988e569502d9015698f065810146]
java.lang.StackOverflowError
at org.mozilla.javascript.ConsString.appendFragment(ConsString.java:78) | |
at org.mozilla.javascript.ConsString.appendTo(ConsString.java:73) | |
at org.mozilla.javascript.ConsString.appendFragment(ConsString.java:79) | |
at org.mozilla.javascript.ConsString.appendTo(ConsString.java:73) |
(...)
at org.mozilla.javascript.ConsString.appendFragment(ConsString.java:79) | |
at org.mozilla.javascript.ConsString.appendTo(ConsString.java:73) |
2016-08-17 16:38:26.993+0200 [WorkflowExecutorPool-Thread-40] DEBUG {USERNAME:WFNAME:8abe988e569502d9015698f065810146:f97a79c4-cde3-4e09-bd44-14b5f7106c61:[f97a79c4-cde3-4e09-bd44-14b5f7106c61]} [WorkflowHandler] Ending WorkflowHandler (8abe988e569502d9015698f065810146), with status[failed]
2016-08-17 16:38:26.996+0200 [WorkflowExecutorPool-Thread-40] DEBUG {USERNAME:WFNAME:8abe988e569502d9015698f065810146:f97a79c4-cde3-4e09-bd44-14b5f7106c61:[f97a79c4-cde3-4e09-bd44-14b5f7106c61]} [WorkflowHandler] Disconnect factory for WorkflowHandler (8abe988e569502d9015698f065810146), with clean session[true]
2016-08-17 16:38:26.996+0200 [WorkflowExecutorPool-Thread-40] DEBUG {USERNAME:WFNAME:8abe988e569502d9015698f065810146:f97a79c4-cde3-4e09-bd44-14b5f7106c61:[f97a79c4-cde3-4e09-bd44-14b5f7106c61]} [VSOFactoryClient] Disconnect from server
2016-08-17 16:38:27.006+0200 [WorkflowExecutorPool-Thread-40] DEBUG {USERNAME:WFNAME:8abe988e569502d9015698f065810146:f97a79c4-cde3-4e09-bd44-14b5f7106c61:[f97a79c4-cde3-4e09-bd44-14b5f7106c61]} [WorkflowHandler] MainScriptingObject exited
2016-08-17 16:38:27.007+0200 [WorkflowExecutorPool-Thread-40] DEBUG {USERNAME:WFNAME:8abe988e569502d9015698f065810146:f97a79c4-cde3-4e09-bd44-14b5f7106c61:[f97a79c4-cde3-4e09-bd44-14b5f7106c61]} [DynamicFunctionCaching] --contextReleased
2016-08-17 16:38:27.008+0200 [WorkflowExecutorPool-Thread-40] DEBUG {USERNAME:WFNAME:8abe988e569502d9015698f065810146:f97a79c4-cde3-4e09-bd44-14b5f7106c61:[f97a79c4-cde3-4e09-bd44-14b5f7106c61]} [WorkflowHandler] Context exited
First I thought that the max string length was reached, however after checking the string length this was not an issue. After that I have thought that maybe a limit of loop iterations was reached and that seems to be the cause. I've built a small workflow that would test my theory and there I have reached the maximum of 2000 loop iteration before the error mentioned above was reported again. This is true for the total number of loop iterations in the scriptable task, so you can have multiple for loop executed one after the other, the total number of iterations cannot exceed 2000.
The question is of course - is it possible to raise the limit?