Book a Demo

Author Topic: Structured Tagged Values  (Read 5000 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Structured Tagged Values
« on: January 26, 2021, 02:47:54 pm »
Hi all

If I look at the example on how to create a structured tagged value (link below), it shows the Address structured tagged value having four attributes:
* PropertyNo (int)
* Street (string)
* Town (string)
* PostCode (int)

However, the data types (i.e. int and string) appear to do nothing whatsoever.
I am wondering what (if anything) I am missing.

https://sparxsystems.com/enterprise_architect_user_guide/14.0/modeling_tools/add_structured_tagged_value_cl.html

Cheers

Jays :-)

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Structured Tagged Values
« Reply #1 on: January 27, 2021, 06:19:27 am »
Yeah its not that easy to figure out as its a bit convoluted. To shed a bit of light into this dark corner of EA you need to understand that tag values are all all strings but you can limit what goes into them using predefined tag values. See this link for more info
Predefined Structured Types | Enterprise Architect User Guide (sparxsystems.com)

Which basically means in your model you've got to tab Configure>UML Types and define PropertyNo as a Tagged Value with "Type=Integer;" in the detail. Similarly for PostCode.

It would be easier if the type  in the attribute actually defined the type wouldn't it?
« Last Edit: January 27, 2021, 06:28:06 am by Sunshine »
Happy to help
:)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Structured Tagged Values
« Reply #2 on: January 27, 2021, 12:09:08 pm »
Yeah, it's not that easy to figure out as its a bit convoluted. To shed a bit of light into this dark corner of EA you need to understand that tag values are all strings but you can limit what goes into them using predefined tag values. See this link for more info
Predefined Structured Types | Enterprise Architect User Guide (sparxsystems.com)

Which basically means in your model you've got to tab Configure>UML Types and define PropertyNo as a Tagged Value with "Type=Integer;" in the detail. Similarly for PostCode.

It would be easier if the type  in the attribute actually defined the type wouldn't it?
(my emphasis)
"Sergeant, shoot that man!  He's making sense!"

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Structured Tagged Values
« Reply #3 on: January 27, 2021, 03:45:34 pm »
"Sergeant, shoot that man!  He's making sense!"
What, as a warning to anyone else who might make sense?
Guess you'll be next against the wall then  ;)

Happy to help
:)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Structured Tagged Values
« Reply #4 on: January 27, 2021, 05:19:54 pm »
"Sergeant, shoot that man!  He's making sense!"
What, as a warning to anyone else who might make sense?
Guess you'll be next against the wall then  ;)
It's the kind of quote you'd find in the last series of Blackadder (in WWI).   :-*

Von Clausewitz (19th century) is reputed to have had similar views about shooting deserters "pour encourager les autres".   (Originally attributed to Voltaire on the death of Admiral John Byng, in 1757)

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Structured Tagged Values
« Reply #5 on: January 27, 2021, 05:38:02 pm »
Which basically means in your model you've got to tab Configure>UML Types and define PropertyNo as a Tagged Value with "Type=Integer;" in the detail. Similarly for PostCode.

It would be easier if the type  in the attribute actually defined the type wouldn't it?

So it is possible to define Predefined tagged values inside structured tagged values????
How do you do that?
The only example for structured tags I have seen requires you to select a class that contains attributes which define the eventual attributes of the structured tagged value.

Cheers

Jays :-)

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Structured Tagged Values
« Reply #6 on: January 28, 2021, 08:32:40 am »
Which basically means in your model you've got to tab Configure>UML Types and define PropertyNo as a Tagged Value with "Type=Integer;" in the detail. Similarly for PostCode.

It would be easier if the type  in the attribute actually defined the type wouldn't it?

So it is possible to define Predefined tagged values inside structured tagged values????
How do you do that?
The only example for structured tags I have seen requires you to select a class that contains attributes which define the eventual attributes of the structured tagged value.

Cheers

Jays :-)

The help says
Quote
The Tagged Values that make up a Structured Tagged Value must be simple; Memo Tagged Values cannot be incorporated in a Structured Tagged Value

I don't remember if that means they have to be simple strings only, or anything but memos. I suspect the former.
The Sparx Team
[email protected]

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Structured Tagged Values
« Reply #7 on: January 28, 2021, 11:28:31 am »
Cool! Thanks all :-)

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Structured Tagged Values
« Reply #8 on: January 28, 2021, 01:23:36 pm »
Which basically means in your model you've got to tab Configure>UML Types and define PropertyNo as a Tagged Value with "Type=Integer;" in the detail. Similarly for PostCode.

It would be easier if the type  in the attribute actually defined the type wouldn't it?

So it is possible to define Predefined tagged values inside structured tagged values????
Not directly in the structured tagged values but in the model and you can use them in your structured tagged values.
How do you do that?
The only example for structured tags I have seen requires you to select a class that contains attributes which define the eventual attributes of the structured tagged value.
Cheers
Jays :-)
Mmmmh? Perhaps I didn't make it clear.
In your Sparx EA Model you need to declare predefined tagged values by going to TAB Configure>UML Types and define PropertyNo as a Tagged Value with "Type=Integer;" in the detail part of the tagged value definition.
Then when you defined the tagged value in the stereotype as an attribute you can just call it PropertyNo and it will pick up the restrictions.
Not 100% sure if I did the predefined tag values in the MDG model and exported them or just put them in the Target Model. Its been a couple of years since I did it.
Happy to help
:)