You are executing a lot of tasks in a loop and Activiti builds up a stack of these tasks so you'll get a StackOverflowError at some point. You can increase the JVM stack settings if you really want to do this. But typically you should use a multi instance construct instead.