Author Topic: v15.2 – What is FQN of «stereotype» (from Profiles)?  (Read 11103 times)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7536
  • Karma: +94/-17
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #15 on: May 31, 2021, 02:37:44 pm »
I can't see from that image what is a metaclass and what is a stereotype.

One problem that I can see is that StandardProfileL2::Metaclass needs to be marked as abstract if you want to reference the original. I don't think you want it generated.
« Last Edit: May 31, 2021, 02:57:53 pm by Eve »
Eve

support@sparxsystems.com

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 7921
  • Karma: +205/-127
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #16 on: May 31, 2021, 03:38:41 pm »
I can't see from that image what is a metaclass and what is a stereotype.

One problem that I can see is that StandardProfileL2::Metaclass needs to be marked as abstract if you want to reference the original. I don't think you want it generated.
Yes, I realised that after I posted.  The next one will be clearer.  :)

I'll make the necessary changes, test it and then post.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 7921
  • Karma: +205/-127
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #17 on: May 31, 2021, 03:59:52 pm »
Here's the updated model. 


StandardProfileL2::Metaclass is now marked as abstract.  Doesn't seem to have made any effective difference.

Paolo
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: 7536
  • Karma: +94/-17
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #18 on: June 01, 2021, 09:33:11 am »
Is it possible that you've been hit with the same issue that I was just hit with? Check the stereotype on your metaclass elements in the properties window. I had several that were showing 'Delphi::metaclass' instead of 'UML Standard Profile::Metaclass'. Those ones were not working with my profile that allowed extension to 'UML Standard Profile::Metaclass'.

If I add an additional metarelationship to a minimal profile, this works with both of them.

Code: [Select]
<?xml  version='1.0' encoding='windows-1252' ?>
<UMLProfile profiletype="uml2">
<Documentation id="1B565022-0" name="FixExtension" notes="FixExtension" version="1.0"/>
<Content>
<Stereotypes/>
<TaggedValueTypes/>
<ViewDefinitions/>
<Metamodel>
<Metaclass name="Stereotype" notes="">
<metarelationships>
<metarelationship constraint="Delphi::metaclass;StandardProfileL2::Metaclass" metaclass="Extension"/>
</metarelationships>
</Metaclass>
</Metamodel>
</Content>
</UMLProfile>

Please excuse me while I get someone to fix the creation of metaclasses.

If you want the comments I was going to make before I discovered that, here they are.

You still should remove the "£". If you remove it from all places after generation I don't think it will make a difference, but better to simplify.

«metaclass» Metaclass is wrong and unneeded. Metaclass extends Class, but you don't need to (and shouldn't) specify that in your profile referencing that stereotype.

Is the «metarelationship» { metaclass = Extension } from «stereotype» Root¯R to «stereotype» StandardProfileL2::Metaclass there for a reason, or just an attempt to show something?

Is «stereotype»Extnsn, its metaclass and metaconstraints there for a reason?
Eve

support@sparxsystems.com

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 7921
  • Karma: +205/-127
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #19 on: June 01, 2021, 10:29:05 am »
Thanks again , Eve,
(See in-line responses)

Is it possible that you've been hit with the same issue that I was just hit with? Check the stereotype on your metaclass elements in the properties window. I had several that were showing 'Delphi::metaclass' instead of 'UML Standard Profile::Metaclass'. Those ones were not working with my profile that allowed extension to 'UML Standard Profile::Metaclass'.
Ours are all correct.  (if for no other reason that we "forced the issue" via another post).
Quote
If I add an additional metarelationship to a minimal profile, this works with both of them.

Code: [Select]
<?xml  version='1.0' encoding='windows-1252' ?>
<UMLProfile profiletype="uml2">
<Documentation id="1B565022-0" name="FixExtension" notes="FixExtension" version="1.0"/>
<Content>
<Stereotypes/>
<TaggedValueTypes/>
<ViewDefinitions/>
<Metamodel>
<Metaclass name="Stereotype" notes="">
<metarelationships>
<metarelationship constraint="Delphi::metaclass;StandardProfileL2::Metaclass" metaclass="Extension"/>
</metarelationships>
</Metaclass>
</Metamodel>
</Content>
</UMLProfile>

Please excuse me while I get someone to fix the creation of metaclasses.
Go for it!
Quote
If you want the comments I was going to make before I discovered that, here they are.

You still should remove the "£". If you remove it from all places after generation I don't think it will make a difference, but better to simplify.
Agreed, and done!
Quote
«metaclass» Metaclass is wrong and unneeded. Metaclass extends Class, but you don't need to (and shouldn't) specify that in your profile referencing that stereotype.
I didn't think it was useful, but "grasping at straws".  Removed!
Quote
Is the «metarelationship» { metaclass = Extension } from «stereotype» Root¯R to «stereotype» StandardProfileL2::Metaclass there for a reason, or just an attempt to show something?
It's there just to show that you can target StandardProfileL2::Metaclass with a metarelationship from our PrIME stereotypes (and generate a true, unstereotyped, Extension).
Quote

Is «stereotype»Extnsn, its metaclass and metaconstraints there for a reason?
Yes; to show I CAN generate a stereotyped Extension (as a PrIME metatype) between a «stereotype» and a «metaclass».  The question now is why can't I generate an unstereotyped one when the <metamodel> seems identical?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 7921
  • Karma: +205/-127
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #20 on: June 01, 2021, 01:31:03 pm »
Thanks again, Eve, for all your assistance!
I've finally sorted what the issue was.  It seems that it was an MDG assembly issue on our part.   :'(
As you're aware, we are still using hybrid (manually managed and model-based) MDG.  We have still not converted all of our items to model-based.  Consequently, we use a post-process after generation of the model-based items to insert the model-based items into the main MDG.  It turns out we were inserting the <Metamodel/> section into the wrong part of MDG (so EA wasn't seeing the metadata we were trying to enable).  We now understand the structure of the MDG better and placing the <Metamodel/> into the correct position enables the QuickLinker entries.

Here's the model we were trying to create in the first place.


So, now we're good to go!   8) 8)
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: 7536
  • Karma: +94/-17
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #21 on: June 01, 2021, 02:10:41 pm »
That's good news. We no longer have a mystery about differences in behavior.

That model looks much simpler.

FYI. I always test these things using a 'Import Package as UML Profile'. It exports the package, wraps it into a technology, imports that technology and refreshes everything. It's the fastest way to iteratively test profile changes like constraints.
Eve

support@sparxsystems.com

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 7921
  • Karma: +205/-127
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #22 on: June 01, 2021, 04:31:21 pm »
That's good news. We no longer have a mystery about differences in behavior.

That model looks much simpler.

FYI. I always test these things using a 'Import Package as UML Profile'. It exports the package, wraps it into a technology, imports that technology and refreshes everything. It's the fastest way to iteratively test profile changes like constraints.
Thanks, I'll bear that in mind.

I do have two questions. When I use the QL to connect a «stereotype» to a «metaclass», it offers "Extension" in the forward segment and nothing in the inverse segment (as expected).  But when I go in the other direction, I get nothing in the both directional segments of the QL.  I would have expected "Extension" in the inverse direction segment and nothing in the forward.  Have I misunderstood anything?

Also, why does the <Metamodel/> segment have to be in a differently identified profile?  Originally, we had included the <Metamodel/> in the Main "PrIME" profile - which didn't work.  When we moved it out into its own profile, it worked.  I don't understand why it needs to be separate.

Paolo
« Last Edit: June 01, 2021, 04:36:11 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: 7536
  • Karma: +94/-17
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #23 on: June 01, 2021, 04:59:46 pm »
For the first question, the truth is I'm not sure. We don't have a reverse label defined, if we did I believe it would generate a quicklinker entry for both directions.

I suspect the point at which it's determining if it can add the reverse relationship it doesn't know if it was allowed as a forward relationship. So it ends up always suppressing the reverse side without the labels being defined.

For the second question, my original test for our discussions was in a profile called PrIME that contained a selection of other stereotypes. I don't think it does need to be separate. In fact every profile that is generated has the Metamodel element in the current version of EA.
Eve

support@sparxsystems.com

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 7921
  • Karma: +205/-127
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #24 on: June 01, 2021, 06:00:33 pm »
For the first question, the truth is I'm not sure. We don't have a reverse label defined, if we did I believe it would generate a Quicklinker entry for both directions.

I suspect the point at which it's determining if it can add the reverse relationship it doesn't know if it was allowed as a forward relationship. So it ends up always suppressing the reverse side without the labels being defined.

For the second question, my original test for our discussions was in a profile called PrIME that contained a selection of other stereotypes. I don't think it does need to be separate. In fact, every profile that is generated has the Metamodel element in the current version of EA.
Must be something to do with my Hybrid MDG.  The main "PrIME" profile doesn't have a Metamodel element (because of its age).  If I have some idle moments I might experiment.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 7921
  • Karma: +205/-127
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #25 on: June 11, 2021, 10:33:05 am »
Must be something to do with my Hybrid MDG.  The main "PrIME" profile doesn't have a Metamodel element (because of its age).  If I have some idle moments I might experiment.

Paolo
It seems to have been something with our Hybrid.  The QuickLinker suddenly stopped working for this Extension relationship, so I brought the <Metamodel/> back into the Main "PrIME" profile and it now works...   :-[

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 12263
  • Karma: +346/-285
  • I'm no guru at all
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #26 on: June 11, 2021, 04:31:02 pm »
IIRC there was a post from last year by Uffe who had a similar issue with such a mixed mode.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 7921
  • Karma: +205/-127
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #27 on: July 23, 2021, 08:29:39 am »
Must be something to do with my Hybrid MDG.  The main "PrIME" profile doesn't have a Metamodel element (because of its age).  If I have some idle moments I might experiment.

Paolo
It seems to have been something with our Hybrid.  The QuickLinker suddenly stopped working for this Extension relationship, so I brought the <Metamodel/> back into the Main "PrIME" profile and it now works...   :-[

Paolo
It's stopped working again!
Code: [Select]
<Metamodel>
<Metaclass name="Stereotype" notes="">
<metarelationships>
<metarelationship metaclass="Extension" constraint="StandardProfileL2::Metaclass"/>
</metarelationships>
</Metaclass>
</Metamodel>
is the Metamodel in the main profile.  AFAIK, nothing material has changed.

Any ideas?
TIA,
Paolo
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: 7536
  • Karma: +94/-17
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #28 on: July 23, 2021, 09:57:15 am »
I'm not a very good mind reader... I can sometimes pick up the only occupant of this room, but that's about it.

Your technology generation didn't put it back as a child of the technology instead of the profile content did it?

You don't accidentally have a Delphi::metaclass as the target?
Eve

support@sparxsystems.com

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 7921
  • Karma: +205/-127
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – What is FQN of «stereotype» (from Profiles)?
« Reply #29 on: July 23, 2021, 10:15:54 am »
I'm not a very good mind reader... I can sometimes pick up the only occupant of this room, but that's about it.
Not asking you to read my mind ;) I'm asking you to read the MDG's! :)
Quote
Your technology generation didn't put it back as a child of the technology instead of the profile content did it?
No, as I said there were no substantive changes (AFAIK).  This would be a substantive change (and I would have picked it up).  This part of the MDG is still handled manually, and it hasn't changed.
Quote
You don't accidentally have a Delphi::metaclass as the target?
You mean that the metaclass I'm trying to attach to is a Delphi::metaclass?
It renders in the Property window as "UML Standard Profile::Metaclass"  which conforms to the defined constraint="StandardProfileL2::Metaclass"

Paolo
« Last Edit: July 23, 2021, 03:37:45 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!