omg-dmn-taskforce / omg-dmn-spec

OMG Decision Model and Notation specification
https://www.omg.org/spec/DMN/
12 stars 9 forks source link

Missing properties for di:DiagramElement in the XMI file #9

Open barmac opened 4 years ago

barmac commented 4 years ago

Currently, the DMNDI13.xmi file does not specify any properties of the DI::DiagramElement:

      <packagedElement xmi:type="uml:Class" xmi:id="_18_1_f7a0369_1441609962778_700532_4351"
                       name="DI::DiagramElement"
                       isAbstract="true"/>

On the other hand, the DI.xsd file contains multiple properties of that type:

    <xsd:complexType name="DiagramElement" abstract="true">
        <xsd:annotation>
            <xsd:documentation>DiagramElement is the abstract super type of all elements in diagrams, including diagrams themselves. When contained in a diagram, diagram elements are laid out relative to the diagram's origin.</xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="extension" minOccurs="0">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> 
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element ref="di:Style" minOccurs="0" maxOccurs="1">
                <xsd:annotation>
                    <xsd:documentation>an optional locally-owned style for this diagram element.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="sharedStyle" type="xsd:IDREF">
            <xsd:annotation>
                <xsd:documentation>a reference to an optional shared style element for this diagram element.</xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="id" type="xsd:ID"/>
        <xsd:anyAttribute namespace="##other" processContents="lax"/>
    </xsd:complexType>

This causes a problem when we try to parse DMN files based on the XMI schema.

philippfromme commented 4 years ago

😴 💤

falko commented 1 year ago

extensions are always done differently in UML and XML. But the rest should indeed be in the metamodel. Looking at the DMN 1.4 class diagram also shows a localStyle and sharedStyle:

DMN Diagram Element class diagram

But that is wrong because all these are inherited from DI::DiagramElement.

For comparison: Here is the UML model from the DD specification: image

Proposal: Move localStyle and sharedStyle from DMN:DiagramElement to DI::DiagramElement and add id to DI::DiagramElement. Maybe also add the UML extension mechanism.

falko commented 1 year ago

This is too big to fix together with the other typos in #8. So I'd suggest we open a separate OMG issue and PR.

falko commented 1 year ago

It's good input for SCE DI though.

falko commented 1 year ago

In today's meeting we decided to defer this issue to DMN 1.6 and wait how SCE is solving this. See also: https://github.com/omg-bpm-taskforces/omg-bpm-specs/pull/4

falko commented 1 year ago

The intention seems to have been to specialize sharedStyle and localStyle for DMNDiagramElement to only permit DMNStyle

falko commented 1 year ago

The XMI is kind of more correct because it only contains the intended connections between DMN:DiagramElement and DMN:Style.

falko commented 4 months ago

@barmac since SCE is finished now, we could revisit this issue. I'm afraid though that it is a little too late for DMN 1.6, which has its Content Freeze tomorrow.

barmac commented 4 months ago

Let's keep this in mind for the next edition. It's not a big deal to be honest.

DMN 1.5

DMN 1.6 right?