Book a Demo

Author Topic: Creating N-Ary Stereotypes in a UML profile  (Read 4027 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Creating N-Ary Stereotypes in a UML profile
« on: June 30, 2014, 06:27:28 am »
I am trying to add a stereotype to my MDG modelled on the N-ary association. However, I am stuck at the first hurdle as I do not know which metaclass to extend.

My first guess was that there would be a separate metaclass for N-ary associations, but I cannot find one.

My second guess was that I need to extend from the standard association metaclass and then use special attributes to configure it as an N-ary association.
Alas, I cannot find this either.

Any help would be greatly appreciated.

Jays :-)

P.s. I am using Sparx 9.3

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating N-Ary Stereotypes in a UML profile
« Reply #1 on: June 30, 2014, 03:33:55 pm »
I tried it the "usual way" by creating an Association metaclass manually. But that did not work either. So you should probably report a bug (link bottom right).

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Creating N-Ary Stereotypes in a UML profile
« Reply #2 on: June 30, 2014, 03:59:27 pm »
Try extending a metaclass named "n-ary Association".
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating N-Ary Stereotypes in a UML profile
« Reply #3 on: June 30, 2014, 08:42:38 pm »
Indeed that value is supplied in the metaclass list. But it did not work either. I created a lozenge and the stereotype was not offered. So it still look like a bug (but a different one).

q.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Creating N-Ary Stereotypes in a UML profile
« Reply #4 on: July 01, 2014, 05:13:35 am »
Quote
Try extending a metaclass named "n-ary Association".

Thanks for that, it works perfectly!

However, when I try to add it to my toolbox I draw a blank.

I tried:

NZDF_EAF::NARY(UML::n-ary Association)

But this didn't work.
So I tried almost every combination (big N, little a, no dash(-), etc..) but can't seem to strike the "magic combination" that will make it work in a toolbar.

Any clues?

Cheers

Jays  :)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating N-Ary Stereotypes in a UML profile
« Reply #5 on: July 01, 2014, 06:51:57 am »
You should send a bug report (except Neil is faster with a magic solution).

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Creating N-Ary Stereotypes in a UML profile
« Reply #6 on: July 01, 2014, 09:43:50 am »
NZDF_EAF::NARY(UML::AssociationElement)
The Sparx Team
[email protected]

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Creating N-Ary Stereotypes in a UML profile
« Reply #7 on: July 01, 2014, 10:43:29 am »
Thanks! That works perfectly!  :)

As feedback to the developers, using AssociationElement to represent a n-ary association is not very intuitive and I would NEVER have guessed that!

As an aside, I have an outstanding post for help with Quick Linkers that I would REALLY appreciate help with.
I have still not got a single Quick Linker to work and its made worse by the fact that the format of the file is different depending on which help material you look at.

Thanks in advance

Jays  :)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating N-Ary Stereotypes in a UML profile
« Reply #8 on: July 01, 2014, 06:54:31 pm »
Quote
NZDF_EAF::NARY(UML::AssociationElement)
So that's definitely a bug since the option in the metaclass-selection expands to n-ary Association. And that's definitely wrong.

q.