Author Topic: Add tag value to existing metaclass/stereotype  (Read 1998 times)

Stanislaw Tristan

  • EA User
  • **
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Add tag value to existing metaclass/stereotype
« on: April 21, 2015, 09:02:08 pm »
Hello!
Is it possible to avoid creation my own stereotype to add a tagged value for existing metaclass? for example, Requirement?
I want all requirements (existing and new) automatically have the defined tagged value.

qwerty

  • EA Guru
  • *****
  • Posts: 10578
  • Karma: +232/-191
  • I'm no guru at all
    • View Profile
Re: Add tag value to existing metaclass/stereotype
« Reply #1 on: April 22, 2015, 04:12:46 am »
You need to create a MDG the creates a (say) <<myRequirement>> extending a Requirement meta class. There you can add your own tags. Se here: http://community.sparxsystems.com/tutorials/552-24intro-to-creating-a-mdg-file

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2650
  • Karma: +41/-2
    • View Profile
Re: Add tag value to existing metaclass/stereotype
« Reply #2 on: April 22, 2015, 09:11:48 am »
To add a tagged value to all existing requirement elements, you will need to write a script. Your script should run a SQL select to find the requirement elements, then loop through them adding the tagged value.

To add a tagged value to newly created requirement elements, create a Project Template Package in your model containing a requirement element with the tagged value.

[But note that qwerty's answer is UML compliant and mine isn't because UML requires that tagged values are applied by stereotypes.]
« Last Edit: April 22, 2015, 11:35:49 am by KP »
The Sparx Team
support@sparxsystems.com