ExecutionListener and error handling

Hi, let me try what we are trying to achive. We have developed an ExecutionListener that will be attached on some process steps where we need to update the state of some object.
This will be triggered by end event of this activity. But it may be that this activity (call process) throws an error. In this case we will not make an state update.
What we are looking for is a way to differentiate happy paths and exceptions. We have looked into DelegateExecution but couldn’t find anything.
Is there a way for us to find was there an exception from ExecutionListener?

Regards,
Miro

@mresetar when the error is thrown, it should create a “incident” which will halt the token/process.

Do you want the token to stop when the error from the call activity is thrown?

Hi @StephenOTT thanks for the reply. I would not want to make any adjustments to token processing. So when error is thrown token (error) should be catched somewhere. But in the same time, in processing, in this case ExecutionListener, I would like to have ability to recognize situation that this is error token that is returned from the call activity. Could I use one of the Camunda services to find about this in ExecutionListener?

Another way to solve “my problem” is that there could be an capability to bypass ExecutionListener (on end at least) when there is an error situation. This makes sense because activity didn’t end with expected result but with an error.
Does this makes sense?

I was doing something similar with Incidents and Catching the error.

So the process was something like: You Try/Catch the entire Listener, and on error you generate a Camunda Incident (which is non-blocking). The incident contains the error information for your review at a later date.

Here is the previous convo:

Thanks @StephenOTT this look promising. We will look more closesly to IncidentEntity and how this could work for us.