cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti time Out

r3dge
Champ in-the-making
Champ in-the-making
Hello,

It seems activiti-rest process engine is configured to failed task when a task is > to 5 min. I have this problem on a activiti-rest install : all process are retrying tasks endless. Do you know how to change configuration to increase this time out parameter ?

regards,
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
I'm not sure I'm following here … are you talking about service tasks that take 5 mins? If so, you should make them async as not to block the REST call that is being handled.

r3dge
Champ in-the-making
Champ in-the-making
sorry if the question is not clear.
The problem was : java service task are canceled if it takes more than 5 min.

I added an event listener on the start event of the process :

public void onEvent(ActivitiEvent event) {
 
  event.getEngineServices().getProcessEngineConfiguration().getAsyncExecutor().setAsyncJobLockTimeInMillis(900000);
 
}

but i'm not sure this is a good practice…

jbarrez
Star Contributor
Star Contributor
Yes, the default lock time if 5 minutes. If your service task is > 5 minutes, it will be seen as 'failed' and it will be acquirable to execute again.
That is indeed the way to set the property to change it, we've made that a processEngineConfiguration property on the current master branch, so in the next release this will be easier.