I am trying to trigger a java class from a user task on a periodic basis using a timer. since the time taken for processing the java class is more, the task gets retried again upto 3 times. I want to disable this and limit the retry to 0. Is there a way to make this to zero.
if I understand you correctly you don’t want the Job/ServiceTask to retry after it fails?
I think the standard behavior for this is 3. If you want to change that you have to check the task as asynchronous (in your case as Asynchronous before). Then you can change the failedJobRetryTimeCycle.
I need to disable the retry process. That is, not to do the default 3 times retry at all. Is there a way to disable this retry? Or by changing the failedJobRetryTimeCycle, will I be able to disable it?
So what your issue is, is that the process is triggered faster than the Java Method is completed?
If this isn’t the case could you explain it a bit more in detail?
What kind of “retry process” do you mean? When is it triggered?
The java class takes around 5 mins to complete its process. So, in my case here, before it gets completed, the same java class is called again and again, leaving it in a dead lock state. So what i actually need is, I dont want the java class to be called again when it is processing. That is, I dont want the process to retry and call the same java class again.
The job executor causes your problem.
I think after 5 Minutes the Job retry is triggered by default.
So the failedJobRetryTimeCycle property of the Service Task is what you are looking for.
your problem is that the JobExecutor will lock the Job on database for I guess 5 minutes per default.
We are not talking about the retry mechanism here but about release of job lock on db.
If the lock is released the jobexecutor will aquire that job again.
If you set Retry config to no retry ( R0/PT10M), this will not solve your problem.
You have to increase the “lockTimeInMillis” of your jobexecutor configuration to a value bigger than the time your service need to complete.
I tried mentioning the lock on Job Executor. But that did not help either. It did get retried again.Is there any other way to make the retry cycle to “0” (zero).