Gateway default outgoing sequence flow can not remove 'name' attribute which is empty when the edge used to be edited

Hi geeks,

I met a problem such that if you ever create a exclusive gateway and assign one empty outgoing edge as default flow, it should work.

=> should looks like:
bpmn:sequenceFlow id=“SequenceFlow_0dhzpbg” sourceRef=“ExclusiveGateway_1j6fvkw” targetRef=“UserTask_1dajvwm”

However, if you ever modified that edge, for example add any condition and then remove the text, seems like there’s no change but the sequence flow will be automatically assign an extra attribute called ‘name’ which is not desirable.
=> Actually looks like:

bpmn:sequenceFlow id=“SequenceFlow_0dhzpbg” name="" sourceRef=“ExclusiveGateway_1j6fvkw” targetRef=“UserTask_1dajvwm”

This caused problem when I use camunda engine and try to deploy xml and it will report an issue like the edge aforementioned is default but also has a condition(which is name=""). I’ve tried many different ways to remove this property like delete operation and modeling.updateProperties function, etc. However, none of them worked. I hope anyone has any thought can share their solution with me.


What did you do? Give us some source code that allows us to understand when this problem occurs.

Hi nikku,

It’s hard to provide my source code here, but the basic operation is if you create an exclusive gateway and have a default outgoing sequence flow edge and make it default, by default this element doesn’t contain the ‘name’ attribute, only ‘id’, ‘sourceRef’ and ‘targetRef’, however, if you ever tried put some condition on the edge, and then remove all characters which make the condition field empty. It looks like it is still bald edge which is the default outgoing edge of the gateway, but at this time the sequence flow element already contains the name attribute and the value is empty string.

One thing is I think at some time I ever used modeling.updateProperties(element, ‘name’, {value:value}), I think this might be the cause why this attribute appears, however, I didn’t find any way to remove the ‘name’ attribute after that. Sounds like modeling doesn’t has remove attribute function. So I think you might have any idea how to solve this problem.