Author Topic: Custom Properties in UML profile meta types  (Read 6862 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Custom Properties in UML profile meta types
« 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 :-)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #1 on: February 13, 2021, 09:32:09 am »
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.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #2 on: February 13, 2021, 09:55:56 am »
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 :-)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #3 on: February 13, 2021, 08:50:31 pm »
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.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #4 on: February 14, 2021, 02:18:21 am »
Would you think I am any less of a man if I cried right now?

KP?!!! Eve?!!! A little help please!

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1323
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #5 on: February 14, 2021, 08:57:29 am »
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.
 :)
Happy to help
:)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #6 on: February 15, 2021, 08:32:25 am »
* 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.
« Last Edit: February 16, 2021, 08:19:40 am by Eve »

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #7 on: February 15, 2021, 08:45:48 am »
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.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #8 on: February 15, 2021, 08:56:11 am »
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
« Last Edit: February 15, 2021, 09:05:43 am by qwerty »

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #9 on: February 15, 2021, 12:03:33 pm »
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 :-(

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #10 on: February 15, 2021, 09:07:14 pm »
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.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13402
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Custom Properties in UML profile meta types
« Reply #11 on: February 15, 2021, 09:15:38 pm »
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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #12 on: February 15, 2021, 09:22:01 pm »
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
Quote
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.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #13 on: February 15, 2021, 10:31:50 pm »
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
« Last Edit: February 15, 2021, 10:39:19 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Custom Properties in UML profile meta types
« Reply #14 on: February 16, 2021, 08:30:34 am »
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.
« Last Edit: February 16, 2021, 08:49:47 am by Eve »