[Clarity needed] Camunda retry Java API?

Hi,

I am familiar that there are REST APIs supported by the engine to retry failed jobs in camunda.
What I want to know from the community is that, are there any JAVA APIs which do the same?

I could not find much regarding the same in the documentation. Any help is appreciated.

Thanks

Do you want retry part of process if process will have failed? Because I use GPRC hedging policy for retry process in general.

1 Like

Hi @prateek_gulati,

you can use this Java method: https://docs.camunda.org/javadoc/camunda-bpm-platform/7.14/org/camunda/bpm/engine/ManagementService.html#setJobRetries-java.lang.String-int-

managementService.setJobRetries(jobId, 1); 

Hope this helps, Ingo

I want to retry any service tasks that fail to get response from external service due to service unavailability (or any other reasons). Thanks for the reply, I would love to hear about your approach.

Thank you awesome Ingo :slight_smile:

Also you can divide your process to few transaction and set value of retry for one transaction.