Author Topic: multiple selection and tagged value  (Read 6675 times)

Emiliano

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
  • if you want, you can !!!
    • View Profile
multiple selection and tagged value
« 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.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: multiple selection and tagged value
« Reply #1 on: March 18, 2008, 04:42:25 am »
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
No, you can't have it!

Emiliano

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
  • if you want, you can !!!
    • View Profile
Re: multiple selection and tagged value
« Reply #2 on: March 18, 2008, 09:27:26 am »
David,

can you show me an example ?

thanks.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: multiple selection and tagged value
« Reply #3 on: March 18, 2008, 09:39:46 am »
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
No, you can't have it!

Emiliano

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
  • if you want, you can !!!
    • View Profile
Re: multiple selection and tagged value
« Reply #4 on: March 18, 2008, 08:58:37 pm »
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 ?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: multiple selection and tagged value
« Reply #5 on: March 18, 2008, 09:52:53 pm »
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.
No, you can't have it!

Emiliano

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
  • if you want, you can !!!
    • View Profile
Re: multiple selection and tagged value
« Reply #6 on: March 20, 2008, 09:47:32 am »
 :(
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


«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: multiple selection and tagged value
« Reply #7 on: March 20, 2008, 10:02:52 am »
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.
No, you can't have it!

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: multiple selection and tagged value
« Reply #8 on: March 22, 2008, 08:24:12 pm »
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...
Recursion definition:
If you don’t understand the definition read "Recursion definition".

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: multiple selection and tagged value
« Reply #9 on: March 22, 2008, 09:12:04 pm »
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
No, you can't have it!

thomas.kilian

  • Guest
Re: multiple selection and tagged value
« Reply #10 on: March 23, 2008, 05:43:57 am »
Quote
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.