I set in bpm-platform.xml the following property:
<property name="failedJobRetryTimeCycle">R1/PT1S</property>
After this setup, every async script and async service task will not retry to execute, as expected.
But I have the problem in getting the correct retries from job executor.
The code in the script(groovy) Task is this:
import org.camunda.bpm.engine.impl.context.Context
def jobExecutorContext = Context.getJobExecutorContext();
if (jobExecutorContext!=null && jobExecutorContext.getCurrentJob()!=null) {
// this is called from a Job
def j = jobExecutorContext.getCurrentJob()
println "Remaining Retries: ${j.getRetries()}" // <----------------- THIS PRINTS '3' instead of '1'(or 0)
} else {
println "No Job found"
}
throw new Exception("Errore di TEST")
The remaining retries are always 3 instead of 1, and it’s not attempting any other retries (and it’s in fact the expected behaviour, I don’t want retries by default)
there’s something I’m missing?