How to make the retry cycle to zero for a timer related activity


#1

Hi all,

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.

I have attached the bpmn for reference.
startprocess.bpmn (3.1 KB)

Thanks and regards,
Vinoth


#2

Hi @vinhard55,

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.

Is that what you are looking for?


#3

Hi @dominikh,

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?

Thanks and Regards,
Vinoth


#4

Hi @vinhard55

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?

Regards,
Dominik


#5

Hi @dominikh,

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.

Thanks and Regards,
Vinoth


#6

Hi @vinhard55,

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.

How long does your task need?

Do somehting like:


#7

Hi @vinhard55

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.

Is it clear for you?

Best regards,

Markus


#8

Thank you @Markus you are right! I have mixed something up… :innocent:


#9

Hi @Markus,

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).

Pls find the details of the Job Log Table
Job Log Details.csv (2.4 KB)

And the following is the content that I added in my bpm-platform.xml file

Please let me know if I am missing something or any other modifications has to be made.

It will be really helpful if i can disable the retry for this particular process.

Thanks and Regards,
Vinoth


#10

Hi @vinhard55

Try the configuration from screenshot from post of @dominikh.
This will set the retry for this specific job to 0.

Best regards,

Markus