AnsweredAssumed Answered

Long-running service tasks

Question asked by jsher on Feb 2, 2012
Latest reply on Sep 5, 2013 by trademak

I would like some advice on best way to implement long-running service tasks in BPMN and Activiti. By long-running I mean tasks which will take more than a second and up to some indeterminate time.

Based on my understanding of how Activiti works (including transaction handling and threading) am I correct in saying that such tasks should not be implemented as synchronous Service Tasks since this would block the engine processing (thread) of the workflow until the blocking invocation returns ?

Rather I suspect it may be best to use a User Task and asynchronously signal completion of the 'long-running' task or alternatively send a message to initiate the task and again asynchronously signal completion of the task. Does this sound reasonable ? Also with these approaches I am guessing that it is straightforward to configure BPMN timer events which fire if the task is not completed in some specified time - something which may not be possible when using blocing Service Tasks.