Book a Demo

Author Topic: MDG: Tagged values for "Custom Diagrams  (Read 3784 times)

Thomas H.

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
MDG: Tagged values for "Custom Diagrams
« on: December 04, 2008, 10:39:41 pm »
Using the MDG Technology I
 - created a Custom Diagram "MyDiagramType" extending an Component Diagram, defined an attributes "LevelX"

I expected this tagged value to be available when I create a new Diagram of my custom diagram "MyDiagramType".

1. I created a MTS file using

  "Tools" -> "Create MDG Technology File..."


2. "Create a new MTS file"
    MTS-File: "C:\Temp\EA-MDG\my-mdg-technology.mts"
    XML-File: "C:\Temp\EA-MDG\my-mdg-technology.xml"

    and included two profiles:

    - profile: my stereotypes
      File: "C:\Temp\EA-MDG\profiles\stereotype.xml"

    - profile: my "Custom Diagrams"
      File: "C:\Temp\EA-MDG\profiles\diagrams.xml"

3. Imported the MDG Technology


As a result my Custom Diagram is available via "Add" -> "Add Diagram" as desired.


Problem: The tagged value I defined is not available.

My diagram profile file
  "C:\Temp\EA-MDG\profiles\diagrams.xml"
looks similar like the following:

<?xml version="1.0" encoding="windows-1252"?>
<UMLProfile profiletype="uml2">

  <Documentation id="F7DBDC51-8"
                 name="My Diagrams"
                 version="1.0"
                 notes="My Diagrams V1.0 for testing purpose"/>

<Content>
  <Stereotypes>
     <Stereotype name="Level-1"
                 alias="Level 1"
                 notes=""
                 cx="90"
                 cy="70"
                 bgcolor="-1"
                 fontcolor="-1"
                 bordercolor="-1"
                 borderwidth="-1"
                 hideicon="0">

        <AppliesTo>
          <Apply type="Diagram_Component">
            <Property name="diagramID" value="MyDiagramType"/>
            <Property name="toolbox" value="ToolboxProfile"/>
            <Property name="alias" value="Level 1: My Diagram Type"/>
            <Property name="frameString" value="#DGMTYPE#: #DGMNAME#"/>
            <Property name="Level" value=""/>
          </Apply>
        </AppliesTo>

        <TaggedValues>
          <Tag name="LevelX"
               type="int"
               description=""
               unit=""
               values=""
               default="1"/>
        </TaggedValues>
      </Stereotype>
    </Stereotypes>

    <TaggedValueTypes/>
    
  </Content>
</UMLProfile>


Has someone an idea why the defined tagged value/attribute "LevelX" is not available?

Thanks in advance,

Thomas
« Last Edit: December 05, 2008, 03:07:26 am by snowy »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: MDG: Tagged values for "Custom Diagrams
« Reply #1 on: December 08, 2008, 11:23:50 am »
The problem is that diagrams aren't model elements and can't own tagged values.

If you have a look at our BPMN profile, you will see the work around that we came up with. The BPMN specification defines a number of properties of business process diagrams but we couldn't attach those properties to each diagram in the form of tagged values, so we create a "Business Process" element that owns each diagram and hang the tagged values on that instead. You might like to use a similar solution.
The Sparx Team
[email protected]

Thomas H.

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: MDG: Tagged values for "Custom Diagrams
« Reply #2 on: December 09, 2008, 12:12:09 am »
Quote
The problem is that diagrams aren't model elements and can't own tagged values.

If you have a look at our BPMN profile, you will see the work around that we came up with. The BPMN specification defines a number of properties of business process diagrams but we couldn't attach those properties to each diagram in the form of tagged values, so we create a "Business Process" element that owns each diagram and hang the tagged values on that instead. You might like to use a similar solution.

Thank you for the answer!

it is good to know what is not possible so I won't try to fix a a mistake I could have made :)

Having the opportunity to use tagged values in a diagram would be very good i believe.
I was just surprised because when you create a profile for custom diagrams tagged values are exported as well. So I actually see no reason why EA should not support this in future versions :)

I think for the beginning I will use my own stereotype to store information for a diagram. I suppose this is what you did for BPMN.

Thomas