Author Topic: UML Profile - Enumeration - Allow Multiple  (Read 2781 times)

mvinca

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
UML Profile - Enumeration - Allow Multiple
« on: September 14, 2010, 10:45:01 pm »
Using http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/addingenumerationstagstost.htm as a reference, it is possible to define a tagged value that is limited to an enumeration, but can select multiple values from the enumeration?

ie. color = Yellow, Red
« Last Edit: September 14, 2010, 10:45:30 pm by mvinca »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13294
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: UML Profile - Enumeration - Allow Multiple
« Reply #1 on: September 14, 2010, 11:02:56 pm »
I think the only type that allows multiple values is the RefGUIDList

Geert

Agecoat

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: UML Profile - Enumeration - Allow Multiple
« Reply #2 on: September 15, 2010, 01:04:08 am »
Mvinca,

I don't think that a enumeration is appropiate for creating a 'multiple select' tagged value.

What you can do is create a tagged value that references one or more attributes of a class.

To do so, within the tool guide you mention;

-------

Preparation

- create a new <<metaclass>> stereotyped "Attribute" element
      - get 'Metaclass' element from 'Profile' toolbox
      - select 'Attribute' element within 'Create New Metaclass' dialog

- create a new <<taggedValue>> stereotyped association from "myStereotype" to "Attribute"
      - select "myStereotype"
      - use the black arrow to draw a line to "Attribute"
      - select 'Tagged Value' in the available stereotypes pop up

- set the target properties of the <<taggedValue>> stereotyped association
      - double click the association line
      - select the 'Target Role' tab within the 'Association Properties' dialog
      - enter the desired tagged value name "myTag" in the 'Attribute Role' field
      - select '*' in the 'Multiplicity' drop down
      - close the dialog

- generate the profile from the <<profile>> stereotyped package

Usage

- create a new <<myStereotype>> stereotyped element
- select the element to view the tagged values for it
- select the tagged value "myTag"
- select the '...' button appearing at the right side of the right tagged value column
- within the appearing "Tagged Values..." dialog, select one or more attributes of the class you want to use for multiple selection

-------

That's it. I do not yet know how to, on meta level, bind the tagged value to attributes of a particular class.

Perhaps this suits you needs. Let me know.

Regards,
Agecoat.
« Last Edit: September 15, 2010, 01:12:48 am by Agecoat »
Using EA Corporate 8.0.863