Bug 373642 - BPMNDI: Implement properties inherited and redefined from DI
Summary: BPMNDI: Implement properties inherited and redefined from DI
Status: ASSIGNED
Alias: None
Product: MDT.BPMN2
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Henning Heitkoetter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-08 08:33 EST by Henning Heitkoetter CLA
Modified: 2012-03-08 09:24 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Heitkoetter CLA 2012-03-08 08:33:28 EST
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'
Comment 1 Henning Heitkoetter CLA 2012-03-08 09:24:56 EST
Fixed for Diagram.rootElement -> BPMNDiagram.plane in commit ef5109edd4f6f910c52bf99b8d3fafdcd385fafd