Bpmn Error Variables Access in Catch Error

Hello,

I’m working in some workflows that integrates somes systems.
I need to catch the errorCode and errorMessage to take an action on it, but apparently I can’t access the variables of the BPMN Error.

Anyone know if it’s possible to get the message ?

I tried this as example:


anyone can help me on it?

@Hanor_Cintra_ROIT This is not yet supported. You can follow this issue.

As a workaround, you can pass the error code and error message as variables and extract them from the Error Catch Event using output mappings.

Ok, thanks for the answer. I’ll try to use in this way.
I need to say that camunda 8 is awesome! I use the camunda since of the camunda 7 beginning and seeing all the camunda 8 potential is incredible.

Thanks again!

3 Likes

That’s wonderful @Hanor_Cintra_ROIT :rocket: So cool to hear that. I’ll share it with the team :tada:

@Hanor_Cintra_ROIT @korthout , Sorry for reviving an old thread, but I am trying to accomplish the same thing with no success. I saw in the docs (Using Connectors | Camunda 8 Docs) that from 8.4, we can pass variables in the bpmnError() function. However I am getting this error:
no function found with name 'bpmnError' and 3 parameters
I am on 8.4.5

Some advice appreciated

Hello bro,

I did a different approach to get the original error and message.

In the “RestConnector” for example, in the “errorExpression” I did the follow:

In the catch error you will be able to get any variable that u gaved as third argument.

I hope this can help u.

Hi, yes that’s exactly what I tried and it worked! Turns out I forgot to update my connector runtime to 8.4. I was on 8.3. Cheers mate!