Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: Jayson on February 13, 2021, 03:12:23 am
-
Hi all
I am currently banging my head against my screen as I try to make use of Custom Properties via the Profile Helpers.
If we take the case I am currently working on (it is not the only one giving hassles), I am trying to set the concurrency Custom Property for a stereotype with Behavioral Feature metaclass.
As far as I can tell, the valid options for this property are "Guarded, Sequential, Active & Synchronous" and I would expect that any stereotypes that I create based on this metatype would have the "Concurrency" radio button set by default to the option I have selected above in the UML profile.
Except...that it doesn't.
To make sure (as much as I can) that I am getting the correct property and name I dragged 4 x stereotypes onto the page and set their Concurrency values (via radio buttons) to each of the above values respectively and then exported the diagram as a pattern.
The result was that each stereotype had a tagged value like that shown below.
<UML:TaggedValue value="Synchronous" tag="concurrency"/>
So the question is then, what am I doing wrong?
* Do I mis-understand the intent of these Custom properties? Are they NOT intended to allow me to set the default values of these properties in stereotypes created from my profiles?
* If my understanding is wrong, then what on earth ARE they for?
* If my understanding is correct, then what am I doing wrong????
* Finally, is there an EASY way to find the valid set of values for each of these Custom Properties? It just seems that the documentation on them is pretty much non-existent.
Cheers
Jays :-)
-
I don't think you can create custom properties except for EA hard coded ones. A profile can only create stereotype properties (which is their purpose). Honestly, I don't know how "custom" properties fit into OMG's meta model.
q.
-
Hey q
So, when I add a Behavioral Feature metaclass to my stereotype, it pops up three categories in the Metaclass properties grid, being:
* Custom Properties,
* Advanced, and
* Feature Visibility.
Under the "Custom Properties" category are the following two properties:
* isAbstract, and
* concurrency.
Feature Visibility & Advanced I understand (I think), but these Custom Properties have got me beaten.
I can edit this (although it gives you precious little clue as to what are valid values in most cases) but I don't seem to see any effect on the resultant stereotype.
The properties DO end up in the profile, its just that (from what I can see) they don't do anything.
Now this could be cos I am not entering the right values, but if that IS the case then how do I find out what those right values are?
I can only assume that Sparx didn't just put them in there for decoration??????
Cheers
Jays :-)
-
It depends. E.g. the custom property kind of Action metaclasses controls whether you create call behavior or other variants. But lots of these are just a mystery. isActive for Class: what is is good for? Try looking up the "help system" and you get a handful results, all in completely different areas than where you want to look. I don't care. I picked the pieces I needed and sometimes I try to shout and eventually get some answer. I learned: when it comes to EA then help yourself. And ignore most of the bells and whistles some genius thought the world would need to exist (with EA).
q.
-
Would you think I am any less of a man if I cried right now?
KP?!!! Eve?!!! A little help please!
-
Would you think I am any less of a man if I cried right now?
I was always taught two things:
1) Never let them see you cry.
2) Always have an escape plan.
:)
-
* Do I mis-understand the intent of these Custom properties? Are they NOT intended to allow me to set the default values of these properties in stereotypes created from my profiles?
Yes, that is the intention.
I don't think you can create custom properties except for EA hard coded ones. A profile can only create stereotype properties (which is their purpose). Honestly, I don't know how "custom" properties fit into OMG's meta model.
They are the properties in the OMG metamodel that don't fit neatly into the EA schema.
isActive for Class: what is is good for? Try looking up the "help system" and you get a handful results, all in completely different areas than where you want to look.
The problem is you're looking in the wrong document. The user guide is not intended to give you all the ins and outs of UML, let alone every other language EA supports. Try searching the UML specification instead.
-
Heyo
So the valid values are those held in the UML specification?
Do they actually DO anything?
I've tried setting them and see if the Stereotypes do anything different but can't see a thing.
In fact, I'm not sure I've even managed to SEE these custom properties on any of the stereotypes.
-
Ok, it looks like the UML spec explains isActive (and probably/hopefully the rest). So thanks for the pointer. However, it would be neat to find that pointer in the documentation.
q.
P.S. Leads me to the question why the EA metaclass shows isActive:Bool as custom property but none of the others like isAbstract? Also, would it be possible to alter isActive (and isAbstract?) by supplying defaults values? I have to try that...
P.P.S. Obviously not (I did not really expect that to work). So it's just there for decoration. EAUI
-
So, did you SEE anything different in Sparx when you set isActive????
I haven't managed managed to find ANY custom attribute that is anything more than a pretty decoration.
And yes, I agree some simple documentation on this would be wonderful and indeed necessary IMO.
By my estimation there are about 50 or some different custom properties in Sparx and so I am not sure how much effort it would be for those who actually created the software to put down a little table of what they do and what the acceptable values are :-(
-
As per my P.P.S. they are just decoration. Even worse, they are incomplete. UML has lots of properties and some made it in EA's many property pages. So you can find the isActive in the floating properties under Details/Is Active. The docked properties does not show it (EAUI). The isAbstract property firms under Abstract in both property windows. I had a look into UML 2.5 and admittedly those custom properties are not "well" documented. It's just they appear over a lot of places but none where you can take a read to digest their semantics (they are going to be used in OCL more and more). I might look into the meta model, though in the past it was just a place where you could see that OMG does not use a common tool to model UML itself. It was more of a skeleton than a model.
q.
-
Why would something like "isActive" need to "do" something?
A lot of properties are just that, a place to put some extra information about an element.
Same with the EA specific properties such as version, or keywords.
It's the user that needs to decide if he wants to do something with that property. If you don't know what it means, you probably don't need it.
I still don't really get the problem you are having, and why you are playing with these custom properties.
I made a bunch of profile's already, and I never even looked at these custom properties.
Everything I need I can do with tagged values.
Geert
-
P.S. Had a look into the meta model. Class shows 2 properties, namely isAbstract and isActive. So Sparx got it 50% right (or wrong). Now, what about Is Leaf and the other ones you see in EA, but not the meta model? Heritage? Likely. For BehavioralFeature UML lists concurrency:CallConcurrencyKind (where the latter has the sequantial, etc. as enumeration literals). The notes read
Specifies the semantics of concurrent calls to the same passive instance (i.e., an instance originating from a Class with isActive being false). Active instances control access to their own BehavioralFeatures.
@Geert: The setting of isActive controls how e.g. object creation works (see above citation). So you might want to create classes with "ísActive" being true rather than not set. You can't do that with the current MDG.
q.
-
Why would something like "isActive" need to "do" something?
A lot of properties are just that, a place to put some extra information about an element.
Same with the EA specific properties such as version, or keywords.
It's the user that needs to decide if he wants to do something with that property. If you don't know what it means, you probably don't need it.
I still don't really get the problem you are having, and why you are playing with these custom properties.
I made a bunch of profile's already, and I never even looked at these custom properties.
Everything I need I can do with tagged values.
Geert
Well, my beef (as usual) is inconsistency. As the Beatles song says
Properties are flowing out
Like endless rain into a paper cup
They slither while they pass
They slip away across the universe
(with apologies to John Lennon ;)) Properties can be expressed all over the Sparx universe.
It could be argued (as Geert has done) that we should ignore the Sparx properties and just use one mechanism (Tags), but because of EAUI, we've found sometimes you need Tags, other times the inbuilt properties and other times attributes and methods to model the properties to our satisfaction.
Paolo
-
P.S. Leads me to the question why the EA metaclass shows isActive:Bool as custom property but none of the others like isAbstract?
They (custom properties) are the properties in the OMG metamodel that don't fit neatly into the EA schema.
isAbstract is available in the EA schema.
This is also a situation where your refusal to upgrade to the latest version of EA bites you. In 15.2 if you select a class you have a checkbox for "Abstract" and "Active" right next to each other.
It could be argued (as Geert has done) that we should ignore the Sparx properties and just use one mechanism (Tags), but because of EAUI, we've found sometimes you need Tags, other times the inbuilt properties and other times attributes and methods to model the properties to our satisfaction.
It's also what Sparx Systems has done for end users by putting the stereotype properties into the regular properties window. I'm giving profile authors credit that they should be able to work out if they added a property or it's a built-in one.
-
This is also a situation where your refusal to upgrade to the latest version of EA bites you. In 15.2 if you select a class you have a checkbox for "Abstract" and "Active" right next to each other.
I opened 15.2 and created a metaclass Class. It only shows isAbstract. I was not talking about the properties windows (which are now a "bit" more aligned) but the metaclass offerings.
BTW: the definitions in the UML specs read "isAbstract", not "Abstract" and I guess the blank in "isActive" is as wrong as leaving out the "is" in the docked properties. EAUI as usual.
q.
-
All you are saying is that Sparx Systems has made presentation choices on how it properties defined by the specification can be viewed and edited.
That includes what I view as a translation from code to English for property names. In my opinion including "is" in the UI repeatedly would be just noise, especially since you're seeing a checkbox. You may like a flat alphabetic list of all available properties with the exact names used in UML, I don't think the average user would.
-
All you are saying is that Sparx Systems has made presentation choices on how it properties defined by the specification can be viewed and edited.
That includes what I view as a translation from code to English for property names. In my opinion including "is" in the UI repeatedly would be just noise, especially since you're seeing a checkbox. You may like a flat alphabetic list of all available properties with the exact names used in UML, I don't think the average user would.
(my emphasis)
Yes, that is s a difficult choice, and you won't please everyone. I take the view that (pretty much) anything has a normative name and a related caption (what you see at the top of the column or to the left on a row - or even in the label on the diagram - etc.). The normative name is fixed but the caption can vary. Even today on my bike ride, I came to the conclusion that we need to provide both an active and a passive caption for behavioural items... (you know... zen-like riding on a LONG cycle path leads to enlightenment :D)
So we'll have a look at adding those properties to the appropriate items in our MDG. Example - active: Manage People, passive; People Management
Just a thought...(dangerous, I know)
Paolo
-
Once again: my main concern is what EA shows in the metaclass. The EAUI is secondary (there's a mix is "is"-use anyway which I consider just sparxian as usual). So please, why does the metaclass show just isActive and not isAbstract? And even more important: why is it shown at all if you do not have a chance to alter its value for elements created with that metatype? As Jayson expressed: they are just decoration. But then not always (like for Actions the callbehavior). Ah, I'm just sick of that.
q.
-
And I've said, the properties listed in that case are what EA calls CustomProperties, and only what EA calls CustomProperties. These are the properties specified in UML for a type that don't fit neatly into EA's database schema.
Like it or not, EA is not making any attempt to abstract away implementation details like that when you are working with profiles.
When I create a class metaclass, the only attribute I see "isActive", matching what is coming from UML. If you're seeing anything else, my first guess would be that you have a template package somewhere that has a class in it.