How does retry with AsycnBefore / After works?

I know how to model retry for a service task in bpmn using “async before/after and retry”, but i don’t know how it works. I have deployed a workflow which exactly does this, but I’m not able to figure it out in the UI. I mean, the service task throws BPMN error (as it is modeled to throw error and retry) and the workflow fails saying below error:

2017-04-04 03:28:06,382 INFO [org.camunda.bpm.engine.impl.bpmn.helper.ErrorPropagation] (job-executor-tp-threads - 3) ScriptTask_2 throws error event with errorCode ‘Error’, but no catching boundary event was defined. Execution will simply be ended (none end event semantics).

I was hoping that process engine would retry this task for 3 times, but it does not. Am i missing something here to understand.

Hi @bpmlearner,

the process engine doesn’t retry the task because a BpmnError is not an exception. It’s a kind of business error which should be caught inside the process. See the reference guide for details.

Best regards,
Philipp

2 Likes

Hi, Thank you. After reading the guide and few posts in the forum, i understood that the task has to throw exception but not BpmnError. Now I could make my task retry in case of any exception