Book a Demo

Author Topic: Stereotype inheriting custom tagged values from metaclass  (Read 4230 times)

damian

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Can I add tagged values to a metaclass that are inherited by related stereotypes?

For example.
Suppose I create a number of specialist requirement stereotypes that extend the core "requirement" metaclass.
Let's say I create one stereotype for UI Requirements and another for Integration Requirements.

My business has a number of service offerings and each individual requirements could relate to one or more of these.
I want to indicate which services are relevant to a requirement using Tagged Values. I need each newly created requirement to have a set of Tagged Values that correspond to my services with a default value of false.

Can I attach my Tagged Values to the requirement metaclass so that they will be inherited by the new stereo types? Or do I need to connect them to each stereotype individually?
 



PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Stereotype inheriting custom tagged values from metaclass
« Reply #1 on: May 24, 2016, 08:02:28 pm »
I think that this will not work.

What I did was creating a stereotype having all common tagged values (I named “Abstract Requirement”) and I derived those common tags by connecting my real stereotypes with "Generalize".
When I look on that realization (done a while ago) I do not understand anymore why “Abstract Requirement” is really abstract (in other words I cannot select that stereotype as user).
But this is the way it works for me.
Best regards,

Peter Heintz

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype inheriting custom tagged values from metaclass
« Reply #2 on: May 24, 2016, 10:00:44 pm »
When you extend a metatype you will inherit the parent's tagged values. Additionally your own tagged values will be added.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Stereotype inheriting custom tagged values from metaclass
« Reply #3 on: May 27, 2016, 12:50:40 am »
Hi Damian, and welcome to the forum.

Just to clarify what the others have already said: you can't add your own tagged values to the Requirement metaclass, but you can create an abstract stereotype "servicerelatedreq" which extends Requirement and which has your tagged values, and then create two concrete stereotypes "uireq" and "integrreq" with Generalizations to "servicerelatedreq". These two should not themselves extend Requirement.

So you can't change the definition of Requirement, but you don't have to specify your tags in each Requirement stereotype either.
Adding tagged values in levels this way is common practice in more complex metamodels.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.