Modeler Bug: Morphing into default flow should remove condition

If a create an ExclusiveGateway component and SequenceFlow component that joins to another component, for example a Task, and then, I add a condition to the SequenceFlow and finally I make this SequenceFlow the default flow in the ExclusiveGateway, then, the condition must be removed in this SequenceFlow, but it isn’t.

A default flow should not have conditions.

What should happen if I add a condition to a default flow… the default attribute should be removed in the ExclusiveGateway?. Right?

My bpmn file:

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
  <bpmn:process id="Process_1" isExecutable="false">
    <bpmn:startEvent id="StartEvent_1" />
    <bpmn:task id="Task_01jipc8">
      <bpmn:incoming>SequenceFlow_0tlaw8b</bpmn:incoming>
    </bpmn:task>
    <bpmn:exclusiveGateway id="ExclusiveGateway_18x2zf8" default="SequenceFlow_0tlaw8b">
      <bpmn:outgoing>SequenceFlow_0tlaw8b</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="SequenceFlow_0tlaw8b" sourceRef="ExclusiveGateway_18x2zf8" targetRef="Task_01jipc8">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">myCondition</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="173" y="102" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_01jipc8_di" bpmnElement="Task_01jipc8">
        <dc:Bounds x="719" y="240" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ExclusiveGateway_18x2zf8_di" bpmnElement="ExclusiveGateway_18x2zf8" isMarkerVisible="true">
        <dc:Bounds x="381" y="255" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="361" y="305" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_0tlaw8b_di" bpmnElement="SequenceFlow_0tlaw8b">
        <di:waypoint xsi:type="dc:Point" x="431" y="280" />
        <di:waypoint xsi:type="dc:Point" x="719" y="280" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="530" y="270" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

A meta comment: Your mixture between strong and normal typing makes it harder to read and understand your post than needed.

You are right about your findings. I was able to reproduce it and created a bug ticket for this.

We are going to fix this in the near future. Thanks for reporting!

And finally, If we add a condition to a default flow, the default attribute should be removed as well and only remains the condition.

Sorry for the strong typing :grin:

Bug in the new version of Camunda modeler (https://camunda.org/download/modeler/)

If we add a condition, and than add a default flow, the condition should be removed and only remains the default flow, but it does not happen, it remains both.

But if we add a condition to a default flow, the default attribute is removed correctly.

My bpmn file:

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
  <bpmn:process id="Process_1" isExecutable="false">
    <bpmn:task id="Task_0qhog5j">
      <bpmn:incoming>SequenceFlow_1she6g3</bpmn:incoming>
    </bpmn:task>
    <bpmn:exclusiveGateway id="ExclusiveGateway_0umonk7" default="SequenceFlow_1she6g3">
      <bpmn:outgoing>SequenceFlow_1she6g3</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="SequenceFlow_1she6g3" sourceRef="ExclusiveGateway_0umonk7" targetRef="Task_0qhog5j">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">my_condition</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
      <bpmndi:BPMNShape id="Task_0qhog5j_di" bpmnElement="Task_0qhog5j">
        <dc:Bounds x="749" y="244" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ExclusiveGateway_0umonk7_di" bpmnElement="ExclusiveGateway_0umonk7" isMarkerVisible="true">
        <dc:Bounds x="456" y="259" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="436" y="309" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1she6g3_di" bpmnElement="SequenceFlow_1she6g3">
        <di:waypoint xsi:type="dc:Point" x="506" y="284" />
        <di:waypoint xsi:type="dc:Point" x="749" y="284" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="582.5" y="274" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>`

hey @rbatllet,

I’ve tried reproducing this in our demo and I’m not able to reproduce it. Please refer to the Camunda Modeler github issues and add one with clear steps on how to reproduce it.

Cheers,
Ricardo

Issue added with a animated gif that reproduce the bug