cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Fail Retry configuration

alef
Champ in-the-making
Champ in-the-making
As reported in the docs (http://www.activiti.org/userguide/#failRetry), Activiti, in its default configuration, reruns a job 3 times in case of any exception in execution of a job.

Is there a way to change the default value in the Activiti configuration or programmatically, not in every bpmn files?

Thanks.

3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi alef,

e.g.
org.activiti.engine.ManagementService#setJobRetries

Regards
Martin

alef
Champ in-the-making
Champ in-the-making
Hi Martin,
I know that feature, but using that API it's not possible to set the time before each retry, but just the retries.

I'm looking for a way to set the time cycle, as I can do in the BPMN with the expression <code><activiti:failedJobRetryTimeCycle>R5/PT7M</activiti:failedJobRetryTimeCycle></code>.
Moreover, I want do that one for all the workflows.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi alef,

I did not try it yet. What I would propose is to create and register new FailedJobCommandFactory, which will provide your JobRetryCmd implementation. In this implementation you can use your own definition of retries (e.g. based on the async task model or global engine configuration)

Regards
Martin