XOR-Gateways mit sichtbarem X ausgeben (#15)
- build_bpmn(): Die BPMNShape jedes exklusiven Gateways bekommt isMarkerVisible="true". BPMN lässt das X optional; ohne das Attribut zeichnet bpmn-js eine leere Raute. OR-, AND- und ereignisbasierte Gateways haben ihr Symbol immer und bleiben unverändert. - Alle Beispiele neu erzeugt: je XOR-Gateway nur das Attribut ergänzt (beispiel_lanes 1, beispiel_prozess 2, Referenzmodell 14), sonst byte-gleich. - Neuer Test test_nur_xor_gateways_zeigen_ihr_x. - Tests: python -m pytest -q -> 93 bestanden. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -884,9 +884,12 @@ def build_bpmn(meta_md, steps, order, externals):
|
||||
}).append(_bounds_el(0, ex_y, pool_width, 100))
|
||||
|
||||
for sid in order:
|
||||
shape = ET.SubElement(plane, q('bpmndi', 'BPMNShape'), {
|
||||
'id': f'{node_ids[sid]}_di', 'bpmnElement': node_ids[sid],
|
||||
})
|
||||
attrs = {'id': f'{node_ids[sid]}_di', 'bpmnElement': node_ids[sid]}
|
||||
if steps[sid].type == 'XorGateway':
|
||||
# BPMN lässt das "X" im exklusiven Gateway optional; ohne dieses
|
||||
# Attribut zeichnen Werkzeuge wie bpmn-js eine leere Raute (#15).
|
||||
attrs['isMarkerVisible'] = 'true'
|
||||
shape = ET.SubElement(plane, q('bpmndi', 'BPMNShape'), attrs)
|
||||
x, y, w, h = bounds_of(sid)
|
||||
shape.append(_bounds_el(x, y, w, h))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user