Book a Demo

Author Topic: Populating a Custom Tagged Value Type  (Read 6514 times)

peterg12345

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Populating a Custom Tagged Value Type
« on: March 03, 2009, 10:36:50 am »
Can someone point me to an example of how to populate a custom tagged value type for an enumerated type. In the on-line example, it shows that there is already an Author list somewhere, etc., but what if I need to create MyList? Where can I populate this (other than in the Detail section of the UML types dialog box)?

TIA,
Pete

bioform

  • EA User
  • **
  • Posts: 230
  • Karma: +0/-0
  • Forty-Two?
    • View Profile
Re: Populating a Custom Tagged Value Type
« Reply #1 on: March 03, 2009, 10:43:33 am »
When I use tagged values they are usually part of a stereotyped element, so in the stereotype diagram I would add my attribute, and set the type to the name of the enumeration, and then create my enmerated type in the diagram...

Save, Export as Profile, Import, the Synch stereotype...

Not Sure If That Helps, hope so
David
Time is what keeps everything from happening at once, Space is what keeps it all from happening to you. <unknown>

peterg12345

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Populating a Custom Tagged Value Type
« Reply #2 on: March 03, 2009, 11:11:28 am »
Not sure about that. What I did was go to Settings | UML...| Tagged Value Type, and create a new Tag, say MyTag. Then in the Detail section I said,

Type=enum;
List=MyList;

Well, the question is, where do I enter the values I want in MyList?

Pete

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Populating a Custom Tagged Value Type
« Reply #3 on: March 03, 2009, 11:46:55 am »
Try:
Code: [Select]
Type=Enum;
Values=Red,Yellow,Green,Blue;
Default=Red;
I believe it is all case sensitive. The help page is here.
The Sparx Team
[email protected]

peterg12345

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Populating a Custom Tagged Value Type
« Reply #4 on: March 03, 2009, 12:03:39 pm »
But rather than listing the enumerated values (Red, Yellow, etc.), I would like Values to point to a list name, which then I could populate. Is that possible?

Pete

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Populating a Custom Tagged Value Type
« Reply #5 on: March 03, 2009, 12:04:34 pm »
(Follows on from Neil's post, not Peter's intervening one!) Yes, look at the eighth item in the table in that Help topic. You got stuck by using List=MyList; which should be replaced with Values=val1,val2...;

In answer to your last post, what values do you want to put in your list? It sounds like that should be a Reference Data list, so are these values already captured in a list that you can expand? See

http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/predefinedreferencedata.html

and

http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/create_predefined_tagged_value.html
« Last Edit: March 03, 2009, 12:19:37 pm by RoyC »
Best Regards, Roy

peterg12345

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Populating a Custom Tagged Value Type
« Reply #6 on: March 03, 2009, 12:52:27 pm »
OK, I am getting the terminology straight...Where and how do I create a "Reference Data List"?

I took a look at the Cardinality list by exporting it as an XML file. I note that the values are stored in table t_cardinality. So is it possible to create my own custom list, and if so, what table do you import the values to?

Pete

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Populating a Custom Tagged Value Type
« Reply #7 on: March 03, 2009, 02:22:06 pm »
I think David (Bioform) is pretty much in tune with what you are trying to achieve. Basically, you want to create an enum Tag that provides a choice of values from a table that you have created and populated yourself. So, you do what David suggested to set up the table in a profile (loaded via an MDG Technology), then you create the tagged value to read the table as you were working out in your original posting.

This process involves a number of procedures from the SDK portion of the Help. You should be able to locate the procedures quickly using the Contents List, Index and Search in the Help.
Best Regards, Roy

peterg12345

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Populating a Custom Tagged Value Type
« Reply #8 on: March 04, 2009, 04:25:42 am »
OK, thanks - I'll give it a shot.

Pete

Thelonius

  • EA User
  • **
  • Posts: 274
  • Karma: +6/-0
  • I think. Therefore I get paid.
    • View Profile
Re: Populating a Custom Tagged Value Type
« Reply #9 on: March 04, 2009, 08:39:04 am »
Quote
I think David (Bioform) is pretty much in tune with what you are trying to achieve. Basically, you want to create an enum Tag that provides a choice of values from a table that you have created and populated yourself. So, you do what David suggested to set up the table in a profile (loaded via an MDG Technology), then you create the tagged value to read the table as you were working out in your original posting.

This process involves a number of procedures from the SDK portion of the Help. You should be able to locate the procedures quickly using the Contents List, Index and Search in the Help.

Roy - have been watching this thread - could you possibly identify an appropriate MDG technology for this purpose?

Thanks - Jon


RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Populating a Custom Tagged Value Type
« Reply #10 on: March 04, 2009, 09:20:14 am »
The MDG Technology is one that you create yourself. It's a type of Add-In. See:

http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/mdgtechnologies_2.html
Best Regards, Roy

bioform

  • EA User
  • **
  • Posts: 230
  • Karma: +0/-0
  • Forty-Two?
    • View Profile
Re: Populating a Custom Tagged Value Type
« Reply #11 on: March 05, 2009, 07:38:17 am »
If anyone is interested I can forward a copy of a requirement stereotype that makes use of tagged values with enumerated type values. Just send me a message and a e-mail address.

David
Time is what keeps everything from happening at once, Space is what keeps it all from happening to you. <unknown>