Sparx Systems Forum
Enterprise Architect => Suggestions and Requests => Topic started by: Emiliano on March 18, 2008, 03:23:44 am
-
Hi,
I need a possibility to select multiple value of an attribute of a requirement. This attribute is defined like a tagged value (an enum type with multiple values).
In which manner i may set a field with multiple choice ??
If this is not possible exist a workaround ??
Thanks.
-
Emiliano,
Perhaps set up an Enumeration with the set of possible values. Then in your element create an attribute, and set its type to the enumeration.
Now you can set the multiplicity of the attribute to make it a set. You can also allow duplicates to create a bag.
This could probably also be done with an association and role definition. Play around and see what works best for you.
David
-
David,
can you show me an example ?
thanks.
-
Sure,
Send me a PM with your email, and I'll send you a very simple example. Unfortunately the XMI file exceeds the size limit for a post or PM.
David
-
Hi David,
thanks for the example but i don't understand how you define a new requirements with attribute that permit a multiple selection.
when i create a "template requirement" i added a tagged value like:
type=Enum;
values=aaa,bbb,ccc,ddd,eee,fff,ggg;
default=aaa;
but this type of definition permit only one selection; so if i want to select both "aaa & eee" i can't.
With your example i don't know how to create a similar attribute.
Can you help me ?
-
As my second email said, you need to set a multiplicity (versus cardinality) on the attribute. Open the attribute properties dialog, then click on the Details tab.
I used a Class to illustrate this so that you could see the [1..4] notation.
-
:(
David,
yesterday i tried to solve the problem but without results.
I want to know if it is possible show me how define the new tagged value using your example.
I tried with:
Type=MyClass;
and added this "tagged value" as a new attribute to my requirement but the result is not correct
-
Were you setting an tagged value on an attribute? If so you must use the AttributeTag class instead of the TaggedValue class. Check under Element Features in EA Help.
-
I've been having the same problem, how do I select multiple values of an enumeration or have multiple instances ot the tagged value. then I discovered a bug: If you add the same tagged value type several times it actually adds all of them, but shows only one.
I noticed it because when I deleted one of the instances - another one was shown...
-
Very interesting Martin.
Still, EA does not appear to actually do what we want. It seems that we cannot define a list-type tagged value, where the user can select multiple values from the list. [I.e. a bit vector.] This omission is certainly present in profile definitions.
I have been trying to come up with a 'clean' workaround. No luck so far. I did communicate with Sparx on this - at length - and they acknowledge this to be an omission, but as yet they have not risen to the challenge.
Perhaps each of you would care to make a feature request directly to Sparx. I am not the only person to bring this up with them of late. Another few might tip the balance.
David
-
I've been having the same problem, how do I select multiple values of an enumeration or have multiple instances ot the tagged value. then I discovered a bug: If you add the same tagged value type several times it actually adds all of them, but shows only one.
I noticed it because when I deleted one of the instances - another one was shown...
Exactly. You can turn on display of multiple Tags somewhere in the options. Then you see all (hidden) instances. This is EAUI at its best.