camunda-community-hub / camunda-platform-7-camel

Community Extension to add Apache Camel support for Camunda Platform 7
Apache License 2.0
82 stars 57 forks source link

Bpmn mapped camel exception #64

Closed johnathani closed 2 years ago

johnathani commented 3 years ago

Any exception being raised in a called Camel route was not being propagated back to the Service Task in the BPMN process.

I believe this would also relate to the following open issues:

The following references cover the difference between business and technical exceptions in a service task. https://docs.camunda.org/get-started/rpa/error-handling/ https://docs.camunda.org/manual/7.15/reference/bpmn20/events/error-events/

The pull will patch the code by interrogating the return Camel Exchange to determine if an exception has been raised within the camel route.

If the Camel route raised the specific BpmnError exception, then the error will be propagated back to the Camanda service task where a boundary error can be used to handle the business error.

If the Camel route throws any other exception (checked or unchecked), this will then be propagated to the service task as a technical error causing the service task to stop in the Camanda process.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.