Book a Demo

Author Topic: Primitive Types in Tags  (Read 4933 times)

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Primitive Types in Tags
« on: September 18, 2017, 06:05:09 pm »
Sometimes I cannot add any value to a tag of an element of a certain stereotype. I got no clue, why.

The chosen primitive type for the regarding attribute in the profile that defines that stereotype may be the cause for my problem.

How do I define the set of primitive types to choose from in creating the profile? Selecting a certain Product Name in the Code Engineering Datatypes? If so is that binding for the whole model or just one element? What would be the best to choose for creating attributes for stereotypes that should become a string value?

Any advice or link to read would be welcome.

Kind Regards

Rolf

p.s. even if I change the datatype back to int, I am not able to enter any value. Maybe there is different reason why I cannot enter a tag-value than the profile datatype.
Rolf

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Primitive Types in Tags
« Reply #1 on: September 18, 2017, 08:03:41 pm »
You can define TVs as Const (see http://www.sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/predefinedtaggedvaluetypes.html). Also check that elements are not locked.

q.

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Re: Primitive Types in Tags
« Reply #2 on: September 18, 2017, 09:19:08 pm »
Thank you qwerty for immediate answer - as my need is urgent.

I could not apply your answer to my problem: the "const" attribute of the Attribute of a stereotype (did you mean that one with your answer "a tag can be const"?) has the value "false".
In your link to some explanation of "Tagged Value Type"  I can find the type "String" (with a capital "S"). But I do not find (may be I am blind?) any explanation how to get that list to attributes of a stereotype in order choose "String" from the types pull-down list. When I pull-down the list of types at the stereotypes attribute, I only see some Java types (I guess), missing the String type. I do not see the Tagged Value Types your link points me to. I do not know how to change that list of types. I would be happy if I would be able to choose from the Tagged Value Types your link points to.

However, I did some progress: I found an older stereotype-element with a String attribute. I copied, renamed and linked it to an appropriate meta-class. The String attribute remained and I can enter something in the tags value when applying the profile and that stereotype in a model. (This proofs that I totally do not understand, how Tagged Value Types work, even not in the simplest String case.)

Is there some more context for a newcomer like me?

Kind Regards


Rolf
« Last Edit: September 18, 2017, 10:05:41 pm by ngong »
Rolf

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Primitive Types in Tags
« Reply #3 on: September 18, 2017, 10:43:06 pm »
Rolf,

It's only after this post that I understand that you are talking about tagged values definitions on stereotypes in UML profiles.

Having that information could have prevented a lot of misunderstanding.

Anyway, the easiest way to go about this is to use the profile helper. Right click on a stereotype element on a diagram and choose "Profile Helper"
There is window that allows you to define the tagged values for that stereotype.

A "String" type tagged value is the default type (no need to do anything special) but the dialog allows you to enter all the different types of tagged values.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Primitive Types in Tags
« Reply #4 on: September 19, 2017, 07:06:36 am »
Seems I got it wrong too. I was talking about defined TVs as constant (as described in the help link I referenced). Those TVs can not take values as they
Quote
Create a read-only constant value.
. But it looks like you were talking about defining TVs in MDGs/profiles. Honestly, I don't seem to have the right idea what you are actually trying to achieve. If Geert's answer does not help you, there's probably some time to elaborate on your question then.

q.

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Re: Primitive Types in Tags
« Reply #5 on: September 27, 2017, 05:09:32 am »
The profile helper solved my problem. I would appreciate that you would be able to add tags to stereotypes not by adding attributes (the types selection issue seems to be unclear here), but only by the profile helper. In that case I would have searched for it.
Rolf