Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: Guillaume on April 02, 2008, 09:56:55 pm
-
Hi
I created a UML profile with a stereotype that extends the Metaclass Class.
This stereotype has a few attributes which have the same name as the tagged value types defined through Settings > UML
When I create a UML Profile XML file, EA converts the stereotype's attributes to tagged values as expected, but the Tagged Value Type is empty:
<TaggedValues>
<Tag name="Memo" type="" description="" unit="" values="" default=""/>
</TaggedValues>
<TaggedValueTypes/>
Instead, I would expect tagged value types to be populated with the following:
<TaggedValueTypes>
<TaggedValueType property="Memo" description="" notes="Type=Memo;"/>
</TaggedValueTypes>
I can't figure out how to sort this out.
I don't want to manually change the XML file so I can easily export from EA.
Thanks
-
I ran into much the same thing back in 7.0. My best guess is that EA does not know how to extend the Metaclass type. [This seems to be more than just omission of the type from the list of available types, EA just plain does not do this.]
Why this is the case I cannot say.
-
Since EA converts stereotype's attributes to Tagged Values, it seems to me that it should also deal with Tagged Value Types defined in the UML profile project.
So I think that it's missing a final step in generating the UML profile XML file.
I've submitted the info to support to see what they say.
Thanks
-
Thanks Guillaume,
That's the correct thing to do.
When I was working on this, it was part of several dozen observations, bug reports, and feature requests. Sparx did a great job of addressing many of these, even more so when you consider that they were in the process of building version 7.1 at the time.
Still, this got lost in the storm.
The greater issue is tying the UML Metamodel functions of EA to the profile development stuff. Unfortunately that appears to be a way off, if it happens at all.
Please let me know how this comes out.
David
-
There is a bit of a trick associated with it.
You need to define the tagged value type using Settings | UML | Tagged Value Types.
When you use that tag as an attribute in your profile it should be exported with the appropriate tagged value type information.
This process is described at http://www.sparxsystems.com.au/EAUserGuide/index.html?definestereotypetags.htm and the linked pages.
-
This is exactly what I did. I created a tag value type using Settings | UML | Tagged Value Types
I then added to my stereotype an attribute with the same name as in the tagged value type.
When exporting the XML file, I only get an empty tagged value type element: <TaggedValueTypes/>
I'd be however interested if you have a sample EA project that exports the Tagged Value Types so I can see what I'm doing wrong.
thanks
-
Sorry, I don't have a sample project.
If you've done all that I would recommend sending the zipped XMI (or eap file) of your profile package to sparx systems report as we can't really see what's going on from here.
-
I received an email from support which has given me a solution.
I now create an MDG Technology File which lets me exporting my UML Profile and Tagged value types altogether within the same file
To generate the file, go to the MDG Technology wizard ("Tools > Generate MDG Technology File" from the main menu)
Further information can be found from the EA help.
MDG allows doing more but it has sorted this problem.
Thanks