cancel
Showing results for 
Search instead for 
Did you mean: 

How to customize the RETRIES_ count in ACT_RU_JOB table

demouser
Champ in-the-making
Champ in-the-making
How to customize the RETRIES_ count in ACT_RU_JOB table. Is there any configuation where i can change the default retry from 3 to any number ?
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
You could extend the DefaultFailedJobCommandFactory (and configure it in the failedJobCommandFactory property of the process engine configuration), to return a modified version of the DecrementJobRetriesCmd. You could set the job-retries to zero instead of the current "job.getRetries() - 1" value.

This will work for all jobs that fail. Offcourse, you can manually set the retry count to 0 for all jobs in your code, however, this requires you to call code fore every timer/job created.

demouser
Champ in-the-making
Champ in-the-making
Sorry i am not getting your point. Each restart of appication server workflow also restarting.Could you plesae show the steps how to avoid the reexuetion of workflow by default.

frederikherema1
Star Contributor
Star Contributor
In case the server restarts when a job is being executed, it will wait (for a max amount of time) for all jobs to complete. If not complete by theat time, it will force all threads to stop. This will rollback any transactions active, when executing a job. So the job isn't actually "executed" successfully. That's why the job will be re-run when server starts, that's the way it's supposed to work.