Book a Demo

Author Topic: Creating UML Profiles  (Read 6264 times)

softnotes

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Creating UML Profiles
« on: January 05, 2015, 05:31:58 pm »
I am revisiting the issue of creating UML profiles.

Having following the instructions for creating a UML profile to the letter a few times now, I keep running into the same problem.

The most  telling problem is the way the "AppliesTo" child of the "Stereotype" element is generated by "Save Package as UML Profile" option in the Project Browser pane.

I have created a stereotype named "my stereotype" which is associated with a metaclass named "Class" via the "Extends" association as per the documentation.

Exporting the package yields the following XML definition of my stereotype.

Code: [Select]
<Stereotype name="my stereotype" notes="My custom stereotype">
    <AppliesTo/>
    <TaggedValues/>
    <Constraints/>
</Stereotype>

When importing the UML profile into another project, the profile loads, but does not contain the stereotype. If the "AppliesTo" entry is manually fixed as per the following example, it works as expected.

Code: [Select]
<Stereotype name="my stereotype" notes="My custom stereotype">
    <AppliesTo>
        <Apply type="class"/>
    </AppliesTo>
    <TaggedValues/>
    <Constraints/>
</Stereotype>

Suggestions please.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating UML Profiles
« Reply #1 on: January 05, 2015, 08:37:22 pm »
It's probably because you failed in one of the many steps (no coffee?) and EA doesn't help you much. I once published this little article. Maybe this will help: http://community.sparxsystems.com/tutorials/552-24intro-to-creating-a-mdg-file

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Creating UML Profiles
« Reply #2 on: January 06, 2015, 08:55:09 am »
What version of EA are you using? When you say via the "Extends" association do you actually mean you have an association with the «Extends» stereotype? I have a vague memory of an old version of EA where «Extends» didn't work and it had to be «extends» instead. In more recent versions of EA, it isn't a stereotyped Association but an actual Extension, although for backward compatibility all three work (Extension, «extends»Association and «Extends»Association).
The Sparx Team
[email protected]

softnotes

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Creating UML Profiles
« Reply #3 on: January 06, 2015, 10:40:24 am »
Thanks for the suggestions. All coffee'd up this morning and at it again.

Quote
What version of EA are you using?

A rather antiquated 8.0.853. Sadly this is the version available to me at this site, with no real hope of upgrading.

Quote
When you say via the "Extends" association do you actually mean you have an association with the «Extends» stereotype?

That is correct. This is created as per step 8 in the documentation on adding Stereotypes and Metaclasses.

Quote
I have a vague memory of an old version of EA where «Extends» didn't work and it had to be «extends» instead. In more recent versions of EA, it isn't a stereotyped Association but an actual Extension, although for backward compatibility all three work (Extension, «extends»Association and «Extends»Association).

I have tried creating «extends» and «extend» Association stereotypes, but have not seen any change in the behaviour.

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Creating UML Profiles
« Reply #4 on: January 06, 2015, 12:10:39 pm »
The documentation you linked to is for release 10 of Enterprise Architect. I don't know how much the procedure changed between release 8 and release 10, but I do know that there were many major changes across the system. The oldest Help immediately available to me is from Release 8.1, but I might be able to go into the archived folders and look at older files.

EDIT: The procedures are superficially the same, but the actual connector for release 8 build 853 is an open arrow with the stereotype <<extends>> displayed on it, whilst for release 10 it is a closed arrow with no stereotype label. From what Neil says, that might not make any difference.

Have you been using that specific procedure from the website, or are you actually using the integrated Help for your release 8.0, accessed within the product by clicking on one of the Help buttons or icons?
« Last Edit: January 06, 2015, 12:26:10 pm by RoyC »
Best Regards, Roy

softnotes

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Creating UML Profiles
« Reply #5 on: January 06, 2015, 01:53:20 pm »
Quote
The documentation you linked to is for release 10 of Enterprise Architect. I don't know how much the procedure changed between release 8 and release 10, but I do know that there were many major changes across the system. The oldest Help immediately available to me is from Release 8.1, but I might be able to go into the archived folders and look at older files.

EDIT: The procedures are superficially the same, but the actual connector for release 8 build 853 is an open arrow with the stereotype <<extends>> displayed on it, whilst for release 10 it is a closed arrow with no stereotype label. From what Neil says, that might not make any difference.

Have you been using that specific procedure from the website, or are you actually using the integrated Help for your release 8.0, accessed within the product by clicking on one of the Help buttons or icons?


I've followed the help that is installed with the product. The documented example and the actual creation process (following the steps) in two ways. The casing of the Association stereotype in the documentation is all lowercase and the directionality of the link created from the toolbox is not set.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Creating UML Profiles
« Reply #6 on: January 06, 2015, 02:57:07 pm »
Does the package that owns your profile diagram have the «profile» stereotype?
The Sparx Team
[email protected]

softnotes

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Creating UML Profiles
« Reply #7 on: January 06, 2015, 03:08:31 pm »
Quote
Does the package that owns your profile diagram have the «profile» stereotype?

It sure has.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Creating UML Profiles
« Reply #8 on: January 06, 2015, 03:14:25 pm »
And when you save your profile, do you save as UML 1 or UML 2? It needs to be UML 2.
The Sparx Team
[email protected]

softnotes

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Creating UML Profiles
« Reply #9 on: January 06, 2015, 03:30:20 pm »
Quote
And when you save your profile, do you save as UML 1 or UML 2? It needs to be UML 2.

Just tried it with both EA UML(1.x) and EA UML(2.x).

The combination of setting up a lowercase «extends» Association stereotype and saving as EA UML(2.x) creates the right result!

Thanks so much for your help. Keep up the good work!