for activities with “asyncBefore = true” it is possible to specify the retry behaviour. Only after the max tries have failed will the engine create an incident.
Is it possible, inside a JavaDelegate, to get the number of tries left until the engine will vreate an incident? How?
Probably too late but here is what I used successfully:
Note: ManagementService is ProcessEngine’s ManagementService.
managementService.createJobQuery().activityId(<your activity Id here>)
.processInstanceId(<your process instance id here>).singleResult().getRetries();
How you can get activity Id and Process Instance Id from within the delegate?, here is how: