How to return from Error and retry Task


#1

Hi,

I would like to have some kind of modeled error handler which would allow to retry the process from the task which caused the error.
Something like this:

The error is handled correctly, but when I finish the user task “Check if resolved”, the process ends completely. I would like to resume the original process from the TASK2 when the user(support) resolves the cause of the error and assesses the process can be retried.
I’ve also tried doing this as a boundary event, but also haven’t found a way to pass the control back to the original flow.
This example is a bit simplified, there are also service tasks in the error handler.
Is something like this possible or do I have to take another approach?


#2

What kind of error are you expecting to occur?


#3

These are usually technical errors, not business errors. I have a huge process and there are 50+ systems being called which can have some downtimes etc. So for example read timeout on calling webservice. When something like this happens(after the specified number of retries), I need to inform some other system(which we assume is without outages) that this happened.
So when someone analyzes the root cause and fixes the offending system, the technical support can retry failed jobs.
It’s not possible to do the error loop for each of the service tasks in the process, that would result in a huge diagram.

Maybe I’m looking at it wrong, but I couldn’t figure out a better way to handle that.


#4

Well i think you shouldn’t model this at all.
Camunda has built in features for the kind of error handling you’re looking for. Maybe take a look at this tutorial video and see if some of the solutions here can be used to solve your problems


#5

Thanks, I’ll check it out.


#6

I’ve checked the video, but still don’t know how to proceed. It looks like I’m looking for something like non-interrupting error handling, but that can’t be modeled in BPMN.

I know how to handle the error on a single service task, but I need to do the same thing for about 50 service tasks. And the error handling will do the same thing for all. Is there some way to tell that the subprocess should return back to where it was triggered?

So far I came up with idea of saving the activity name where the error is thrown and after the error is handled restart the original process using https://docs.camunda.org/manual/7.6/user-guide/process-engine/process-engine-concepts/#start-a-process-instance-at-any-set-of-activities


#7

At around the 12 minute mark in the video i explain how to catch technical errors that might occur. I suggest you do that for your service tasks.


#8

I think I understand how to handle errors. I’m just looking for a way to be able to model handling of technical error without interrupting the process. Something like this, but without repeating the same thing in the model for every service task

Now I’m exploring if it could be done via signals or message events instead of BPMNErrors, but I’m not sure it’s viable.


#9

I’ve ended up modeling it as a subprocess which returns to the original process. The downside is that I have to track where the process failed and skip the already executed tasks.