AnsweredAssumed Answered

StackOverflowError when process looping to much

Question asked by billbaroud on Apr 3, 2012
Latest reply on Apr 3, 2012 by trademak
Hi guys,

I have the following process, that is looping and get messages from an 'incoming queue', delete the messages found and wait 5 seconds if no message is found.

[img]http://img594.imageshack.us/img594/3875/plopq.png[/img]

Problem: if my queue is filled with more than 30 messages, the workflow will loop 30 times and I get the following error:

Exception in thread "pool-1-thread-2" java.lang.StackOverflowError
        at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.ensureVariableInstancesInitialized(VariableScopeImpl.java:51)
        at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.hasVariableLocal(VariableScopeImpl.java:140)
        at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.hasVariable(VariableScopeImpl.java:129)
        at org.activiti.engine.impl.el.VariableScopeElResolver.getValue(VariableScopeElResolver.java:63)
        at org.activiti.engine.impl.javax.el.CompositeELResolver.getValue(CompositeELResolver.java:231)
        at org.activiti.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:81)
        at org.activiti.engine.impl.juel.AstBinary$SimpleOperator.eval(AstBinary.java:27)
        at org.activiti.engine.impl.juel.AstBinary.eval(AstBinary.java:106)
        at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)
        at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26)

Musst I set a wait timer between each and every loop ?

Thanks :)

Bill

Outcomes