-
Feature Request
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
The BPMN parse errors thrown by the engine have limitations that make it hard to comprehend reported problems and/or map problems back to actual BPMN elements:
- Errors sometimes do not provide the relevant context (BPMN element IDs)
- Some errors affect multiple elements, in these cases only one (if at all) element is provided as a context (tracked by https://app.camunda.com/jira/browse/CAM-10245)
- The parser logs both, errors and warnings, however on deploy, only the errors are exposed during deployment (cf. https://github.com/camunda/camunda-bpm-platform/blob/5a36efd83682231af3b67015dbb13bf00c65dff1/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java#L268)
I propose the following solution:
(1) Provide additional `getErrors()` and `getWarnings()` interfaces for the `ParseException`. This allows you to catch the exception from Java Code and see what's up
try { // deploy } catch (ParseException ex) { ex.getErrors(); ex.getWarnings(); }
(2) Expose the errors and warnings via REST API on deployment
POST /engine-rest/deployment/create => HTTP 400 { "type" : "ParseException", "message" : "existing, unchanged message", "errors": [ ... ], "warnings": [ ... ] }
(3) Ensure that all errors / warnings get logged with the IDs of affected BPMN elements
Related issue: https://app.camunda.com/jira/browse/CAM-10245
Existing work on this topic has already been done in this PR: https://github.com/camunda/camunda-bpm-platform/pull/333