Support for providing variables in ZeebeBpmnError

Hi,

When using the JobClient it is possible to provide variables in case of a BpmnError, by using the newThrowErrorCommand builder.
In the spring based approach I can return a BpmnError by throwing a ZeebeBpmnError from my JobWorker method. However, in the ZeebeBpmnError I can only specify the errorCode and errorMessage properties. I do not see a way to provide the variables in the Exception being thrown.

Also when looking at JobHandlerInvokingSpringBeans#137 (in 8.2.4) it seems not to be supported at this point in time since the method in the builder to set the variables is not invoked.

Can you let me know if this is supported after all; or if/how I can request this as a feature if this is not done already? (I do not see it when searching the issues)

Thanks.

Anyone? Or can I somehow define this feature, have it approved as feature and then provide a PR for it?

Hi @Patrick,

as the Zeebe API accepts variables when a BPMN error is thrown: Zeebe API (gRPC) | Camunda Platform 8 Docs, I think it’s just a missing implementation.

So it is fine to create a pull request for the missing constructor, and it is likely that it will be accepted.

Hope this helps, Ingo