Author Topic: MDGs - Multiple instances of stereotype?  (Read 3207 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8598
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
MDGs - Multiple instances of stereotype?
« on: September 30, 2015, 11:30:59 am »
I'm playing around with some of the extended attributes of a Metatype / Stereotype (for example: _TargetMultiplicity)

Is it possible to have more than one instance of a stereotype in an MDG?  For example, one with _TargetMultiplicity = "1" and another with _TargetMultiplicity = "1..*"?

I suspect not, and anyway, how could the quicklinker deteremine which to use?

In any event, maybe what might be needed is a _StoredStereotype attribute to store the one I want after all the other processing is done.

Stereotype: Association1
_TargetMultiplicity = "1"
_StoredStereotype = "ArchiMate_Association"

Stereotype: Association2
_TargetMultiplicity = "1..*"
_StoredStereotype = "ArchiMate_Association"


This would open up ALL sorts of possibilities...

Can anyone confirm?
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: MDGs - Multiple instances of stereotype?
« Reply #1 on: September 30, 2015, 11:50:58 am »
I think you could do it with an addin. Have a couple of dummy stereotypes in your technology, which is what you ask for from the toolbox and quicklinker, and then your addin has an EA_OnPostNewConnector broadcast handler which can see which dummy stereotype has been created, removes it, applies the real stereotype, and sets the additional info.

If you don't want an addin, you could use a script. But then you would be modelling with the dummy stereotypes and post-processing when finished/ready.
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8598
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: MDGs - Multiple instances of stereotype?
« Reply #2 on: September 30, 2015, 01:25:36 pm »
Thanks Neil,

I was hoping to avoid an Add-In.  I can do just about anything with an Add-In!    ;)

Since it's just the last step in an already well specified and supported process, is it worth trying to get it added as standard functionality?  As I said, I think the possibilities are quite powerful...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!