camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.49k stars 476 forks source link

Success deployment message is shown even if deployment failed #1123

Closed thesilentbob1 closed 5 years ago

thesilentbob1 commented 5 years ago

Describe the Bug When trying to deploy an invalid bpmn process the modeler shows the successful green message, but the process is not deployed and to understand what happened I have to check the camunda server logs.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create the following process in the modeler:
    <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" id="Definitions_1cdfxbw" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.4">
    <bpmn:process id="BAD" isExecutable="true">
    <bpmn:startEvent id="StartEvent_1">
      <bpmn:messageEventDefinition />
    </bpmn:startEvent>
    </bpmn:process>
    <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="BAD">
      <bpmndi:BPMNShape id="StartEvent_0zki3qs_di" bpmnElement="StartEvent_1">
        <dc:Bounds x="173" y="102" width="36" height="36" />
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
    </bpmndi:BPMNDiagram>
    </bpmn:definitions>
  2. Try to deploy via the "Deploy Current Diagram" button
  3. You'll see the "Success" message, but comunda will just throw error:

21-Jan-2019 15:17:46.426 WARNING [http-nio-8080-exec-2] org.camunda.bpm.engine.rest.exception.ProcessEngineExceptionHandler.toResponse org.camunda.bpm.engine.ProcessEngineException: ENGINE-09005 Could not parse BPMN process. Errors:

  • attribute 'messageRef' is required | bad_diagram.bpmn | line 5 | column 38
  • Invalid 'messageRef': no message with id 'null' found. | bad_diagram.bpmn | line 5 | column 38

and nothing will be deployed

Expected Behavior

An error message w/ details should be shown instead of the success message.

Environment

Please complete the following information:

barmac commented 5 years ago

Fixed in https://github.com/camunda/camunda-modeler/pull/1041. The fix is included in the recent pre-release 3.0.0-0. We are not planning to port it to 2.x version.

Please note, however, that pre-release does not ship all of the features of 2.2.4 version (e.g. plugin system).