AnsweredAssumed Answered

blocking in user task complete

Question asked by zivac on Apr 8, 2011
Latest reply on Oct 1, 2012 by jbarrez
Hello everybody.
First post to the forum.

I hope someone will be able to help us.
We are trying to use Activiti for business processes in our application.
We are using Activiti through API (we are not usign Activiti Explorer etc.)

In a business process in question we have a user task which is basically
a file upload (user sets a file for processing). Immediately following is a
service task which processes the given file. The service task can sometimes last
very long (minutes and potentially hours).

The problem occurs when a user clicks in our user interface to submit the
task form which triggers task complete method to be executed.
Complete method seems to execute next task in business process flow (service task)
and returns from execution only after the service task has ended.
This causes our web application to wait after submit for prolonged periods of time.

How should we deal with this problem?
We have considered running complete() or the service task in a different thread
but we are not sure if that is the "correct" solution.
Are we doing something completely wrong?
What is the best and correct way of doing this?

Thanks in advance

Outcomes