By the BPMN standard, a label's position is specified via a Bounds element within the BPMNEdge -> BPMNLabel. This seems to work for most element such as start events and gateways, but not for sequence flows, which is why I'm guessing it might be a bug.
The editor allows placing the label of a sequence flow at arbitrary positions.
In the resulting XML, the editor outputs the label's position both as a non-standard extension element within the sequence flow, as well as a standard Bounds element within the BPMNEdge:
<sequenceFlow id="_4" name="foobar" sourceRef="_2" targetRef="_3"> <extensionElements> <yaoqiang:label offset-x="3.0" offset-y="0.0" x="0.0" y="105.0"/> </extensionElements> </sequenceFlow> <bpmndi:BPMNEdge bpmnElement="_4" id="Yaoqiang-_4"> <bpmndi:BPMNLabel> <dc:Bounds height="20.98" width="42.0" x="309.96" y="103.96"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge>
However, when importing a standard-compliant BPMN XML with only the BPMNEdge bounds, but no extension element, the label position is not imported correctly. This only seems to happen for sequence flows, not for other elements such as events and gateways
See the attached bpmn-edge-label.bpmn for an example, as well as bpmn-edge-label-expected.png for how it should look on import vs bpmn-edge-label-actual.png how it actually looks on import.
Anonymous
Hmm, it seems to work for some elements, but not others. E.g. for DataObjectReference and DataStoreReference, the label position is also not respected on import when no custom extension element is present.
Currently, Yaoqiang only supports custom edge label position which created by Yaoqiang Editor. So Yaoqiang Editor will omit it and use default label position when no custom extension element is present.