Community
Participate
Working Groups
Classes of the BPMNDI part of the specification have several features that redefine or subset properties from the DI specification. From the CMOF: 'BPMNDiagram.labelStyle subsets Diagram.ownedStyle' 'BPMNDiagram.plane redefines Diagram.rootElement' 'BPMNEdge.bpmnElement redefines DiagramElement.modelElement' 'BPMNEdge.label subsets LabeledEdge.ownedLabel' 'BPMNEdge.sourceElement redefines Edge.source' 'BPMNEdge.targetElement redefines Edge.target' 'BPMNLabel.labelStyle redefines DiagramElement.style' 'BPMNPlane.bpmnElement redefines DiagramElement.modelElement' 'BPMNShape.bpmnElement redefines DiagramElement.modelElement' 'BPMNShape.label subsets LabeledShape.ownedLabel' In DI.ecore, the redefined (or subsetted) properties are defined as derived, transient, not volatile, not changeable. In subclasses of BPMNDI, they should return the value from the redefining (subsetting) property, e.g. Diagram.rootElement should return BPMNDiagram.plane. (In each subclass, at most one property subsets another, so a union is not required.) To implement: Make the features in DI.ecore volatile (no field needed) and override the getter of the redefined / subsetted property in redefining / subsetting classes, returning the value of the redefining / subsetting property. This is especially important for BPMNDiagram.plane, because Diagram.rootElement is required and the current (non-)implementation causes validation errors. All other features are optional (lower bound of zero). Additionally, there are some subset relationships within DI: 'LabeledEdge.ownedLabel subsets DiagramElement.ownedElement' 'LabeledShape.ownedLabel subsets DiagramElement.ownedElement' 'Plane.planeElement subsets DiagramElement.ownedElement'
Fixed for Diagram.rootElement -> BPMNDiagram.plane in commit ef5109edd4f6f910c52bf99b8d3fafdcd385fafd