Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: dr_shorthair on February 12, 2008, 01:30:30 am

Title: Difficulties creating a UML profile
Post by: dr_shorthair on February 12, 2008, 01:30:30 am
I've followed the instructions in the Help pages starting at "Create a Profile Package".
Two problems:

1. the procedure to add a predefined tag type does not appear to work at all
2. inconsistent/broken behaviour when saving and loading
(i) I saved the profile out as a "UML profile" using right-click/Save Package as UML Profile in the Project Browser; when I loaded this profile in the Resources panel, only a subset of the stereotypes were loaded. I checked the XML file, and they all appear to be there
(ii) I saved using right-click/Save as Profile on the diagram; when I loaded in the resources panel the stereotype ordering was jumbled

I can provide the XMI and both XML Profiles for debugging.


Title: Re: Difficulties creating a UML profile
Post by: «Midnight» on February 12, 2008, 05:35:38 am
Before you go too far, try a different method of loading the profile.

Up until build 825 there is an error in the help file - I reported it several builds ago and it has been corrected. At the end of the MDG Technology section it tells you to load the profile, and points you to an obsolete procedure.

Look in help for the section that uses the Settings | MDG Technologies dialog. On that dialog use the Add button to add a folder, or simply put your XML file into the default folder for MDG Technologies. EA will correctly load the file when it boots up.

If that still does not work, check again using the EA 7.1 beta. Please report any problems that remain.

HTH, David
Title: Re: Difficulties creating a UML profile
Post by: dr_shorthair on February 12, 2008, 08:29:54 pm
Thanks David -

Yes - that is a big help.
It allows me to package several UML profiles as well as tagged values, so that another user can load this environment.

Some more investigation of the profile save/load issue:

1. After running "Save Package as UML Profile" from the project browser, several of the Stereotype/AppliesTo elements are missing. This is why they do not show up when loaded as a Resource. Why are they not saved?
2. The "Order Stereotypes" function does not appear to have any effect.
Title: Re: Difficulties creating a UML profile
Post by: «Midnight» on February 13, 2008, 03:12:06 am
1. I think you will have to create toolbox profiles to do what you want. This is not (yet) as straightforward as I'd like to see. I am working with Sparx on this issue.

2. No, I don't think it does. Toolbox profiles also help in this regard.

David
Title: Re: Difficulties creating a UML profile
Post by: KP on February 13, 2008, 01:33:42 pm
Quote
1. After running "Save Package as UML Profile" from the project browser, several of the Stereotype/AppliesTo elements are missing. This is why they do not show up when loaded as a Resource. Why are they not saved?

Sorry to answer a question with a question, but what are you extending with your stereotypes?
Title: Re: Difficulties creating a UML profile
Post by: dr_shorthair on February 13, 2008, 10:06:13 pm
The ones I have most problems with extend <<metaclass>> Class.

I also found that one that extends both <<metaclass>>Attribute and AssociationRole sometimes misses one of them in the list of <AppliesTo> classes.
Title: Re: Difficulties creating a UML profile
Post by: KP on February 14, 2008, 02:22:05 pm
Quote
The ones I have most problems with extend <<metaclass>> Class.

In that case, there's no easy answer - I would have to look at your profile. Could you export your profile package to XMI and e-mail it to Sparx Support ([email protected]) please? I'll investigate the problem.

Neil
Title: Re: Difficulties creating a UML profile
Post by: «Midnight» on February 14, 2008, 03:37:37 pm
Hey guys, this is getting interesting.

We might be getting into the business of metamodel profiles, which is not yet a strong point of EA.

Dr S: If you are able to share, or have a benign example, please let me know via a private message (see the upper right of a forum page).

Neil: I gave up on a similar problem with the "classifier" metaclass - ignore the quotes but pay attention to the capitalization - a while back. Drop a line when you have time. [As if that were possible these days...]

David
Title: Re: Difficulties creating a UML profile
Post by: dr_shorthair on February 14, 2008, 06:05:47 pm
Can you believe that the problem went away! I banged my head against it for 3 hours on Wednesday. I tested today and the AppliesTo elements are now all present.

However, the Stereotypes are still not ordered as requested. I'll send you the XMI anyway so you can look at the latter issue (though obviously much less important).
Title: Re: Difficulties creating a UML profile
Post by: Paolo F Cantoni on February 14, 2008, 10:52:49 pm
Quote
Can you believe that the problem went away!
It's one of the features of EAUI that problems can appear to vanish (or at least not be easily reproducible).

After some time, you start to question your own eyesight... But all it is is that you have to go through exactly the same set of steps to recreate the behaviour.  Often hard to do with EA.

In your case you may be lucky and you may never experience the bug again.

Paolo


Title: Re: Difficulties creating a UML profile
Post by: Graham_Moir on February 15, 2008, 02:02:07 am
Regarding order of stereotypes, I have found that if you reorder them the way you want in the project browser BEFORE exporting this will influence the order when the profile is subsequently loaded.  This has been OK as a workaround for me.
Title: Empty xml-profile file after profile export
Post by: FKS on February 27, 2008, 12:33:15 am
Hello all.

I also tried to create a UML-Profile for our domain.
The new profile should extend the SysML technology, which is part of the model. The model contains, like the help says, some metaclasses, custom stereotypes with alternate images and other elements.

In the export dialog the profile type "UML 2.0 (Recommended)" is grayed out. So I exported the profile as "EA Pre-4.0".
As a result I only get an empty profile.
Does anybody know what went wrong or what is missing in the model to export the new profile with the elements defined in the package (as recommended profile type in the export dialog)?

Best regards
Frank
Title: Re: Difficulties creating a UML profile
Post by: thomas.kilian on February 28, 2008, 12:46:26 am
I'm now in the position to bang my head for another 3 hours. The AppliesTo is not exported. And even worse: it's a Profile that had been working under a previous (before 6.5) version. I had reported the bug (13.7.2007) and it's still not working. :-X
Edit: Short 3 hours (luckily). I created a new EAP file from scratch and repeated everything. Now the export succeeded. It might be that the database needed to be created from scratch and profiles won't work with 'old' databases  :o
Title: Re: Empty xml-profile file after profile export
Post by: KP on February 28, 2008, 09:09:28 am
Quote
In the export dialog the profile type "UML 2.0 (Recommended)" is grayed out.
I think that means that you are right-clicking a "normal" package to save the profile. Try giving the package the «profile» stereotype.