Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: PeterHeintz on October 12, 2017, 11:43:19 pm
-
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 )?
-
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
-
The memo could probably be solved by setting a default value <memo> (with the angle brackets).
q.
-
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! ;)
-
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.
-
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
-
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?
-
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
-
Ok! I will give it a try and come back!
-
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. :'(
-
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 (http://sparxsystems.com/enterprise_architect_user_guide/13.5/modeling_tools/predefinedtaggedvaluetypes.html)
Geert
-
Hi Geet,
SfSTime is my own type I defined with 2Detail" Type=Time;.
I thought that was what you suggested.
-
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
-
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
-
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.
-
Ok,
This works for time and maybe for some else, may be for date and memo as well, but for date and memo you can do something else.
Summary:
-for date and memo you can put <date>/<meme> in the Attribute Initial Value field.
-for using other predefined tags you have to define a Tagged Value Type for each and you have to put the name of that Tagged Value Type as Attribute Name
If you what to use Enums you have to put that in the Attribute Type
So if your goal is to entirely confuse the users, I recommend to use the Stereotype and Alias field as well to come to end. ;)
-
I guess that is the reason why they developed the profile helper.
I'm lucky as I never had to work without it, so I never payed much attention to the actual resulting attributes.
Geert
-
<grumpy>Having so-called Helpers is not only an indication that people made some user interface which is broken and now try to fix that. It's even worse as they keep the broken and the bypass at the same time. This is double broken. How about replacing the UI with something in one part that works? Bah! What am I dreaming of?</grumpy>
I guess the MDG creation "wizard" has been designed by the same people.
Probably I'm still tempted to cry out when I see things like Clippy (http://knowyourmeme.com/memes/clippy).
q.
-
I guess that is the reason why they developed the profile helper.
I'm lucky as I never had to work without it, so I never payed much attention to the actual resulting attributes.
I teach people to use it because rolling it all by hand you're much more prone to simple errors (such as spelling), especially if you fall somewhere on the dyslexia/dyscalculia spectrum.
-
I guess that is the reason why they developed the profile helper.
I'm lucky as I never had to work without it, so I never payed much attention to the actual resulting attributes.
I teach people to use it because rolling it all by hand you're much more prone to simple errors (such as spelling), especially if you fall somewhere on the dyslexia/dyscalculia spectrum.
It's not the simple errors that get you, but the silent failing that doesn't tell you where you made the simple error
Paolo
-
It's not the simple errors that get you, but the silent failing that doesn't tell you where you made the simple error
To be fair, how is it meant to know "feesch" is meant to be "fish"? :-)
-
It's not the simple errors that get you, but the silent failing that doesn't tell you where you made the simple error
To be fair, how is it meant to know "feesch" is meant to be "fish"? :-)
It can't, but it could tell you that the term "feesch" is invalid in the context, just like.. hmm, I don't know, like every code editor anywhere :o
Geert
-
I am with qwerty, and I use the profile helper whenever I am able to.
In this case I just was not able to, because I was looking for a way to define with the profile helper a tag using a Tagged Value Type Format. This I found by adding strings like <memo>, <data> in Default Value.
But what on earth is the difference in putting a string in the Default Value field of the profile helper in comparison to put the string in the Initial Value field of an attribute?
At the end I can say that there is no feature at all in the profile helper to define a tag with a tagged value type of type <time> and most others, as defined here:
https://www.sparxsystems.com/enterprise_architect_user_guide/13.5/modeling_tools/predefinedtaggedvaluetypes.html
You have to go outside, defining uml tagged value types and afterwards, when using the profile helper again you have to know the “Predefined” does not refer to the major content you find here https://www.sparxsystems.com/enterprise_architect_user_guide/13.5/modeling_tools/predefinedtaggedvaluetypes.html
but more to the content here:
https://www.sparxsystems.com/enterprise_architect_user_guide/13.5/modeling_tools/predefinedtaggedvaluetypes.html
I have a "not so simple MDG" and I maintain that for years. I know and sometimes forget most pitfalls and sources of errors and there are a lot, even when using the helpers.
It is far away from beeing such simple as "Use the helpers and all works fine".
Anyhow, I am absolutely sure, that with not much effort the power of MDG could be made much handier for creation.