cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to make retry 0 in activiti engine.

mahesh_yadav
Champ in-the-making
Champ in-the-making
Hi,

Is there any configuration by which I can set retry of activiti engine for a task to zero (actually I don't need activiti to retry for job that has failed since I don't want to process failed tasks).

Currently I am manually getting the job with jobId and making the retry to zero in case of any Exception. But in case of 'lockTimeInMillis' exceed my code does not execute as it is internal to activiti and it does retry. So is there a way by which I can disable this retry in any situation.

Regards
Mahesh
2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ

mahesh_yadav
Champ in-the-making
Champ in-the-making
Thanks for the reply.

I am using the same failedJobCommandFactory to make retry to 0 after exception.

And in one of link above the code changes has been done to activiti code which I don't want. If 'failedJobCommandFactory' is only solution I will continue to use it. Wanted to know if there is out of box configuration or hook mechanism by which we can set retry to as 0 to global so that I dont have to write failedJobCommandFactory implementation.

Sometime if activiti-engine is terminated in mid of workflow execution failed job command factory will not be called and when activiti is started it will again start retrying ( I even dont want retry in that case as well) Smiley Happy.

Regards
Mahesh.