Camunda - Generic error handling from service task


In My project I have multiple service tasks. Now from each service task if any error happen then it will go to error event which will have an user task. After user verify when marks complete then the BPM process should again start from the same service task from where it got error. I am using spring boot and camunda 7.16.0.

Start → Service Task 1 ->Service Task 2 → Service Task 3 → End

Now for example, error happen at Service Task 2. In this case it will throw a BPMNError from java code and it will reach to a event sub process. From event sub process, after logging the error it will go to User Task and once the user take manual action to complete the task it should start from Service Task 2 again. Same requirement is for Service Task 1 & 3 also.

So, is it possible from camunda to throw error from service task and then again start from the same service task again with same process instance id.

Hi @Souvik_Bhattacharya,

You posted in a Camunda 8 topic, but you are asking about Camunda 7. I moved your post to a Camunda 7 topic for you.


Hi @Souvik_Bhattacharya

There are a few different way of doing this in Camunda 7 and i once did an example project that basiclally does what you’re asking although it’s just an example and does have some drawbacks.

1 Like

Thanks for the help.

One more thing, can we some how change the user task name dynamically to know from which service task it failed.

hello Nial, i tried this solotion. The process would proceed normally as if nothing had happened. so I couldn’t direct it to the name I wanted.

my process ıs bellow

GenerıcErrorSender’s JavaDelegate code:

String taskId = (String) execution.getVariable("errormessage");

and usertask1 when complete,

and generic error complete,
but the process continued its normal behavior and proceeded to the undesired task.