AnsweredAssumed Answered

How to implement long-running tasks in Activiti?

Question asked by zlatan316 on Aug 13, 2015
Latest reply on Oct 2, 2015 by zlatan316
Hi,

My process is a simple model with 2 service tasks. ServiceTask1 can take over 15 minutes to run in the execute() method, and ServiceTask2 completes in mere seconds. What happens is that ServiceTask1 will cause the Activiti database to timeout as the transaction has remained open longer than 5 minutes.

I want to instead run this ServiceTask so that it can run for however long it wants until it then tells the process to continue with ServiceTask2. I understand in Activiti 5:17(and 5.18), there is a new JobExecutor which can help with executing a long running task but I can find any code examples of its use, or a diagram example of how to model the execution of these longer running Service Tasks.

Can anyone assist?

Outcomes