AnsweredAssumed Answered

Best way to handle looping service tasks to avoid StackOverflowError

Question asked by jdp on May 2, 2016
Latest reply on May 5, 2016 by jdp
Hi,

I have a workflow as displayed in below link for a specific requirement :
Design : https://www.dropbox.com/s/t3k6tsmnanaziub/ServiceTaskLooping.png?dl=0
Definition : attached
Test Class : attached

here when 'status' is other than 1 or 2, workflow goes in infinite loop and throws a StackOverflowError ::

Caused by: java.lang.StackOverflowError
        at org.activiti.engine.impl.context.Context.getStack(Context.java:91)
        at org.activiti.engine.impl.context.Context.getProcessEngineConfiguration(Context.java:58)
        at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:45)
        at org.activiti.engine.impl.bpmn.behavior.ServiceTaskExpressionActivityBehavior.execute(ServiceTaskExpressionActivityBehavior.java:68)

Can anyone please suggest how to handle such scenario or which is the best way to handle this.

Thanks,
JDP

Outcomes