Is there a way to define a boundary error event to catch Java RuntimeExceptions or similar technical errors without defining each error for Service and Script tasks. In essence a catch ALL RuntimeExceptions boundary event which can then create a log, or follow some other path without creating an incident.
There isn’t.
The idea being that a RuntimeException caught by the engine will create an incident and a BPMN is designed to only catch “bussiness errors”.
So if you wanted this to always trigger an error event you’d need to catch the runtime error in the code and subsequently throw a BPMN Error with
Ok, this would be good when using a Delegate class or script, catching an exception and throwing a BPMN Error in code.
However, when utilising a service task with http-connector, I assume there would be no way to do it as you cannot throw a BPMN Error from with a REST response. You would need a subsequent task to map the response to throw a BPMN Error. Would this be correct?
One option for you might be to essentially write your own “connector”, i.e. to build a Service Task that handles the connectivity to external REST resources, and then have that Service Task catch exceptions and then re-throw them as BpmnError instances. You could even use the Camunda HTTP Connector via its Java API within that Service Task to accomplish that goal.