Book a Demo

Author Topic: Create a constant tagged value  (Read 2874 times)

Lars J.

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Create a constant tagged value
« on: January 29, 2014, 12:45:05 am »
Hi all,

I am currently trying to achieve the following:

- create a new UML profile P2 with a new stereotype (say, ST2) extending another stereotype ST1 from another profile P1 (which extends the meta class). This works.

- When P2 is loaded and ST2 is used (class ST2 is instantiated) the resulting instance is to have a constant tagged value with a certain predefined value. This also works, but my question is: Is it the right approach I am taking or is there a better....

Here is what I did:
1. The profile P2 with its type ST2 is defined in a certain MDG with the ID mdgID.
2. There I also created a new Tagged Value Type using "Settings | UML Types -> Tagged Value Types".
3. I specified the tag name "ConstTag" and in the details section I specified the format for the predefined structured tagged value type Const (replacing the value).
4. On the stereotype ST2 in profile P2 I added an attribute with nothing more then name of mdgID::ConstTag.

The result is that when I have used ST2 is I see in the properties dialog of ST2 a tagged value with name "mdgID::ConstTag" and the specified value when in the tree on the left the entry P2 is selected.

Is that the right way or is there a better one??

thanks and best regards

Lars