Get notify or set callbacks when workflow instance failed because of exclusive gateway expressions

I’m using zeebe’s go client library to trigger instances and provide service task handlers.
I want to watch error event that a process instance is failed on exclusive gateway expression evaluating so that I can handle it such as send an email or so on.
for example I have expression:

= a = 1

but in the instance variables there’s no variable “a”, then instance will fail with error:

failed to evaluate expression '(a=1)': no variable found for name 'a'

So is there a way to catch this error so that my server can do some stuff? Thank you

Hello @Lethe_Yi ,

this error will be exported and be available in the event stream (by default inside an EL).

When using Operate, you will be able to retrieve the error from the Incident REST endpoint.

Also, when using Camunda Cloud, there is a possibility to get notified on errors.

I hope this helps

Jonathan

2 Likes

could you please explain the detail about the event stream(or the EL), I’m not very clear about this, thank you.

If you are self-hosting Zeebe, you can load an exporter in the broker. This exports events. There is an Elastic Search exporter that can export to Elastic Search, where you could periodically query.

Otherwise you could do something like this: GitHub - jwulf/zeebe-incident-alerter: An exporter to alert on Incident creation via a Web hook

hope this helps,
Josh

1 Like