Author Topic: How to use Predefined Structured Types for tags for MDG Technologies?  (Read 231 times)

PeterHeintz

  • EA User
  • **
  • Posts: 534
  • Karma: +34/-14
    • View Profile
If have stereotypes define in my MDG technology profile having some tags. Most of those are just text, enums or structures. I also use Date as defined here:
http://www.sparxsystems.com/enterprise_architect_user_guide/13.0/modeling_tools/predefinedtaggedvaluetypes.html
what works fine for me.

To do that, I add to my stereotype definition in the profile an attribute and type in as Type of that attribute “Date”.

By doing so, an element using that stereotype get a tag that shows a calendar to select a date. All fine!

However when I try the same e.g. with Memo or Time my tag is just a pure String (neither a memo, nor a time).

Is it a bug that Memo, Time, … does not work?
Or is it a bug that Date works?
What is the right way to do such thing within UML Profiles (not Reference Data )?
Best regards,

Peter Heintz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7621
  • Karma: +154/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #1 on: October 12, 2017, 11:56:12 pm »
Peter,

Are you using the profile helper or are you manually editing the attributes of your stereotype?
I found that a lot of these issues can be avoided by using the profile helper.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 8849
  • Karma: +134/-120
  • I'm no guru at all
    • View Profile
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #2 on: October 13, 2017, 12:59:49 am »
The memo could probably be solved by setting a default value <memo> (with the angle brackets).

q.

PeterHeintz

  • EA User
  • **
  • Posts: 534
  • Karma: +34/-14
    • View Profile
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #3 on: October 13, 2017, 01:41:58 am »
Hi Geert,
I did it manually, just because I did not find a way to do that with the profile helper.

Hi Qwerty
Magic beats mystery.
Magnus qwerty is right: Putting <memo> as default value works, but putting time works neither as type nor as default value <time> and date works in both ways.

For sure V14 will provide more consistency! ;)
« Last Edit: October 13, 2017, 01:44:41 am by PeterHeintz »
Best regards,

Peter Heintz

qwerty

  • EA Guru
  • *****
  • Posts: 8849
  • Karma: +134/-120
  • I'm no guru at all
    • View Profile
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #4 on: October 13, 2017, 05:49:01 am »
You should send a support request to Sparx regarding the Time. I wouldn't be too astonished if you need to put in clock instead xD

q.

philchudley

  • EA User
  • **
  • Posts: 520
  • Karma: +9/-0
  • UML/EA Principal Consultant / Trainer
    • View Profile
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #5 on: October 16, 2017, 11:21:54 pm »
Check the ID used when the MDG is generated.

The ID must be the same name as the name used in the MDG packages, for example, if using the Model Wizard to create an MDG project browser structure, you are prompted for a name, let's say you entered MYMDG, this name is then used throughout the package structure for the MDG model.

When generating the MDG ensure that you use MYMDG as the ID, then all should be OK.

Once more thing, the ID cannot be more than 12 characters, so when choosing a name for the MDG bear this in mind.

Hope this helps
Phil
follow me on Twitter

@SparxEAGuru

PeterHeintz

  • EA User
  • **
  • Posts: 534
  • Karma: +34/-14
    • View Profile
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #6 on: October 18, 2017, 08:29:31 pm »
Hi philchudley,
I am not sure if I have used the Model Wizard to create the MDG project browser structure at all (Just too long ago to remember).

Now I looked in my model wizard and I even did not find a model template. Do you mean the MDG Technology Profile Helper in the Profile Toolbox?

This I have not used because I need several stereotype, diagram and toolbox packages just to get my profile definition well structured.

My root package having somewhere down in the package tree the <profile>package leafs has another name than the ID I define when creating the MDG.

Do you say that there is some constraint to have the name of that root package the same as the ID I define when generation the MDG?

This constraint would be somehow strange because what should be the purpose of that?
Best regards,

Peter Heintz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7621
  • Karma: +154/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #7 on: October 18, 2017, 08:34:40 pm »
I'm not sure anymore, but I think that in case of complex tagged values that you need to define them first in your DEV model as regular tagged values, use them in your profile, and then include the tagged value definition in the MDG as well.

Geert

PeterHeintz

  • EA User
  • **
  • Posts: 534
  • Karma: +34/-14
    • View Profile
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #8 on: October 18, 2017, 09:26:28 pm »
Ok! I will give it a try and come back!
Best regards,

Peter Heintz

PeterHeintz

  • EA User
  • **
  • Posts: 534
  • Karma: +34/-14
    • View Profile
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #9 on: October 18, 2017, 10:03:37 pm »
Ok,
Now I added under UML Types/Tagged Value Types a tag with name SfSTime having a Detail Type=Time;.

In my stereotype definition I tried to use that by:
Initial Value = SfSTime
Initial Value = <SfSTime>
Type= SfSTime

Nothing is working in my project using that mdg.
What works is using SfSTime in my project for manual created tags. :'(
Best regards,

Peter Heintz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7621
  • Karma: +154/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #10 on: October 18, 2017, 10:37:03 pm »
I haven't seen SfSTime as a valid tagged value type.

I see Time and TimeStamp as alternatives

see http://sparxsystems.com/enterprise_architect_user_guide/13.5/modeling_tools/predefinedtaggedvaluetypes.html

Geert

PeterHeintz

  • EA User
  • **
  • Posts: 534
  • Karma: +34/-14
    • View Profile
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #11 on: October 18, 2017, 10:39:41 pm »
Hi Geet,
SfSTime is my own type I defined with 2Detail" Type=Time;.
I thought that was what you suggested.
Best regards,

Peter Heintz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7621
  • Karma: +154/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #12 on: October 18, 2017, 10:51:46 pm »
It was, I didn't read it properly. :-[

So did you also add the tagged value definition to the MDG file?
And did you use the profile helper to select the tagged value type?

The devil is often in those minute details when dealing with MDG's and stuff.

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1033
  • Karma: +80/-5
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #13 on: October 19, 2017, 12:38:52 am »
Context, context.

In your stereotype definition (class), try setting the tagged value attribute type to YourMdgTechId::SfSTime. I think that's the syntax.

Otherwise, the profile helper should be able to sort it out for you because it does allow you to select a tagged value type from the ones defined in your MDG Technology project ("Add Specialized -> Predefined" in the context menu).

And -- is it plugged in -- you have definitely included the tagged value definition as well, yes? Not manually copied it into your target project. Included it in the MDG Technology. ?


/Uffe
My theories are always correct, just apply them to the right reality.

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6163
  • Karma: +45/-5
    • View Profile
Re: How to use Predefined Structured Types for tags for MDG Technologies?
« Reply #14 on: October 19, 2017, 08:25:07 am »
Ok,
Now I added under UML Types/Tagged Value Types a tag with name SfSTime having a Detail Type=Time;.

In my stereotype definition I tried to use that by:
Initial Value = SfSTime
Initial Value = <SfSTime>
Type= SfSTime
Unfortunately, that won't work. You can't use the tagged value definitions as a type to be specified by other tagged value definitions.

You need to define a tagged value type with the name matching the name of the desired tagged value,  and add an attribute with that name to your stereotype.
Simon

support@sparxsystems.com