Author Topic: v15 - How to show self-metatype relationships in metamodel?  (Read 19071 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #15 on: August 19, 2019, 10:09:42 am »
No. A class element, with the stereotype «metaclass» and the name "source.metatype".

Ie. You specify it exactly the same as saying you can only specialize a "UseCase", "Class" or any UML metaclass. It differs from your stereotypes because it is «metaclass» instead of «stereotype».
Sorry, Eve,

Still not clear what I'm trying to do here.  I have the metaclass defined, but to what and how do I attach it?  From above, it seems a Generalization from Composition to the new metaclass, but then that applies to ALL compositions doesn't it?  I only want to apply it to this one.  In any event, what should I see in the generated profile?  I assume the result ends up in the stereotypes profile, and not the toolbox.

Help, please.
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: 8061
  • Karma: +118/-20
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #16 on: August 19, 2019, 12:23:35 pm »
The following describe the ArchiMate Element object and the constraint that all elements can have Composition, Aggregation and Specialization to the same type.

XMI
Code: [Select]
<?xml version="1.0" encoding="windows-1252"?>
<xmi:XMI xmlns:uml="http://www.omg.org/spec/UML/20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:umldi="http://www.omg.org/spec/UML/20131001/UMLDI" xmlns:dc="http://www.omg.org/spec/UML/20131001/UMLDC" xmlns:thecustomprofile="http://www.sparxsystems.com/profiles/thecustomprofile/1.0" xmlns:EAUML="http://www.sparxsystems.com/profiles/EAUML/1.0" xmlns:Profile_Constraints="http://www.sparxsystems.com/profiles/Profile_Constraints/1.0">
<xmi:Documentation exporter="Enterprise Architect" exporterVersion="6.5"/>
<uml:Model xmi:type="uml:Model" name="EA_Model">
<packagedElement xmi:type="uml:Profile" xmi:id="EAPK_E48A9BBC_5DB2_4d63_96A2_FFE843F40EEF" name="MyArchiMate">
<packagedElement xmi:type="uml:Stereotype" xmi:id="EAID_311CC9E2_E488_4e56_9F5E_3BA42DA14153" name="Element" isAbstract="true"/>
<packagedElement xmi:type="uml:Dependency" xmi:id="EAID_45B06FE1_D511_4242_82AE_D5B6DEC97761" supplier="EAID_E74B6DDB_F70D_40d8_9032_C5667C6E1F64" client="EAID_311CC9E2_E488_4e56_9F5E_3BA42DA14153"/>
<packagedElement xmi:type="uml:Dependency" xmi:id="EAID_4BC5A764_60C8_444e_88D7_DEB9396168C3" supplier="EAID_E74B6DDB_F70D_40d8_9032_C5667C6E1F64" client="EAID_311CC9E2_E488_4e56_9F5E_3BA42DA14153"/>
<packagedElement xmi:type="uml:Dependency" xmi:id="EAID_64E0282A_347F_42ed_B590_44B1A9CEC0F6" supplier="EAID_E74B6DDB_F70D_40d8_9032_C5667C6E1F64" client="EAID_311CC9E2_E488_4e56_9F5E_3BA42DA14153"/>
<packagedElement xmi:type="uml:Class" xmi:id="EAID_E74B6DDB_F70D_40d8_9032_C5667C6E1F64" name="source.metatype.specific"/>
</packagedElement>
<profileApplication xmi:type="uml:ProfileApplication" xmi:id="profileap_thecustomprofile">
<appliedProfile xmi:type="uml:Profile" href="http://www.sparxsystems.com/profiles/thecustomprofile/1.0#thecustomprofile"/>
</profileApplication>
<profileApplication xmi:type="uml:ProfileApplication" xmi:id="profileap_9752B6B7-0">
<appliedProfile xmi:type="uml:Profile" href="http://www.sparxsystems.com/profiles/Profile_Constraints/1.0#9752B6B7-0"/>
</profileApplication>
</uml:Model>
<Profile_Constraints:stereotyped_relationship base_Dependency="EAID_45B06FE1_D511_4242_82AE_D5B6DEC97761" __EAStereoName="stereotyped relationship" stereotype="Aggregation"/>
<Profile_Constraints:stereotyped_relationship base_Dependency="EAID_4BC5A764_60C8_444e_88D7_DEB9396168C3" __EAStereoName="stereotyped relationship" stereotype="Composition"/>
<Profile_Constraints:stereotyped_relationship base_Dependency="EAID_64E0282A_347F_42ed_B590_44B1A9CEC0F6" __EAStereoName="stereotyped relationship" stereotype="Specialization"/>
<thecustomprofile:metaclass base_Class="EAID_E74B6DDB_F70D_40d8_9032_C5667C6E1F64"/>
</xmi:XMI>

Exported profile.
Code: [Select]
<?xml version="1.0" encoding="windows-1252"?>
<UMLProfile profiletype="uml2">
<Documentation id="E48A9BBC-5" name="MyArchiMate" version="1.0" notes="MyArchiMate"/>
<Content>
<Stereotypes>
<Stereotype name="Element" notes="" isAbstract="true">
<stereotypedrelationships>
<stereotypedrelationship stereotype="MyArchiMate::Composition" constraint="source.metatype.specific"/>
<stereotypedrelationship stereotype="MyArchiMate::Specialization" constraint="source.metatype.specific"/>
<stereotypedrelationship stereotype="MyArchiMate::Aggregation" constraint="source.metatype.specific"/>
</stereotypedrelationships>
</Stereotype>
</Stereotypes>
<TaggedValueTypes/>
<ViewDefinitions/>
<Metamodel/>
</Content>
</UMLProfile>

If I wanted to use the UML connectors instead of stereotyped copies I would have used the metarelationship connector type.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
By George he's got it!!!
« Reply #17 on: August 19, 2019, 01:04:21 pm »
"The rain in Spain falls mainly on the plain!"

When I imported what you sent, it didn't seem it import properly (I presume it was only a partial export), but looking at the XML you provided, I was able to work out that the stereotyped relationship, instead of reflexing into Element, needs to be targeted at the constraint metaclass.  I made some changes and observed the behaviour was as expected!  :D  Now to explore what I can do with it!

Thanks for your help, finally got there!
Paolo
« Last Edit: August 19, 2019, 01:15:41 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!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #18 on: August 20, 2019, 11:07:41 am »
Hi, Eve,
Had a bit of a play with the different types of constraints.  Doesn't seem to be working the way you suggested.

The help should have something like this.

Special Metaclasses
You can specify the source of a connector to be a superclass of all specialized forms, and the target to a special metaclass that specifies a relationship to the actual metaclass when it's used.

MetaclassDescription
source.metatypeThe target element must match the exact stereotype defined at the source.
source.metatype.generalThe target element may match the exact stereotype used at the source and any concrete (isAbstract=false) generalized stereotypes.
source.metatype.specificThe target element may match the exact stereotype used at the source and any concrete (isAbstract=false) specialized stereotypes.
source.metatype.bothThe target element may match the exact stereotype used at the source and any concrete (isAbstract=false) generalized or specialized stereotypes.
[/quote]

Define Abstract Stereotype 'Element' (may extend Concept if you're following their metamodel)
Abstract Stereotype 'Motivation Element' specializes Element (possibly indirectly)
Concrete Stereotypes 'Value', 'Meaning', 'Driver', 'Assesment', 'Goal', 'Outcome', 'Principle', and 'Requirement' all specialize 'Motivation Element'
Concrete Stereotype 'Constraint' specializes Requirement.

Create a stereotype «stereotyped relationship» {stereotype=Composition} to a «metaclass» with one of the names in my previous post. In all cases, each of the stereotypes will be allowed to have a composition to other elements with the same stereotype. How they differ is in the behaviour of Requirement and Constraint.

If the target is 'source.metatype' Neither Requirement or Constraint will be able to have a composition relationship with the other.

If the target is 'source.metatype.general', A Constraint can have a Composition to Requirement.

If the target is 'source.metatype.specific', A Requirement can have a Composition to Constraint.

If the target is 'source.metatype.both', both can have a Composition to the other. (Which happens to match the relationship table in the ArchiMate specification)

What we found...

If the target is 'source.metatype', neither Requirement nor Constraint has a Composition relationship to the other.

If the target is 'source.metatype.general', both have a Composition to the other.

If the target is 'source.metatype.specific', neither Requirement nor Constraint has a Composition relationship to the other.

If the target is 'source.metatype.both', neither Requirement nor Constraint has a Composition relationship to the other.

For testing purposes, we create a Motivational Element (Abstract) item on the toolbox.

If the target is 'source.metatype', Motivation Element has a Composition relationship Requirement.  The reverse is not available.

If the target is 'source.metatype.general', Motivation Element has a Composition relationship Requirement.  The reverse is not available.

If the target is 'source.metatype.specific', Motivation Element has a Composition relationship Requirement.  The reverse is not available.

If the target is 'source.metatype.both', neither Requirement nor Motivation Element has a Composition relationship to the other.

Are we doing something wrong?  Or is there bugs?  Can you confirm your version works as specified?

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: 8061
  • Karma: +118/-20
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #19 on: August 22, 2019, 10:47:19 am »
I haven't had the time to test it to my satisfaction, but it's not working like I would have expected. I'll try to comment further when I get a chance.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #20 on: August 22, 2019, 01:20:07 pm »
I haven't had the time to test it to my satisfaction, but it's not working like I would have expected. I'll try to comment further when I get a chance.
Thanks, Eve,

I've put it aside until you give further guidance.

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: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #21 on: August 29, 2019, 02:19:34 pm »
I haven't had the time to test it to my satisfaction, but it's not working like I would have expected. I'll try to comment further when I get a chance.
Thanks, Eve,

I've put it aside until you give further guidance.

Paolo
[BUMP]

Any advance on this?
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: 8061
  • Karma: +118/-20
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #22 on: August 30, 2019, 09:20:51 am »
I still haven't had time to investigate to my satisfaction.

I'm afraid that some of the described functionality is currently only in a development version.

From what I can see, source.metatype and source.metatype.specific have checks in quicklinker generation. However, because the stereotype check later includes specialized stereotypes they act the same except when dragging to empty space.

Those two plus source.metatype.general have validation code, but given you seem to be able to create the relationships it doesn't appear to be correct.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #23 on: August 30, 2019, 09:50:07 am »
I still haven't had time to investigate to my satisfaction.

I'm afraid that some of the described functionality is currently only in a development version.

From what I can see, source.metatype and source.metatype.specific have checks in quicklinker generation. However, because the stereotype check later includes specialized stereotypes they act the same except when dragging to empty space.

Those two plus source.metatype.general have validation code, but given you seem to be able to create the relationships it doesn't appear to be correct.
Thanks, Eve,

Appreciate the effort.  Obviously, we see this as key to being able to create a consistent relationship structure.

Avagoodweegend!
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: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #24 on: September 09, 2019, 11:02:50 am »
Hi Eve,

Any "movement at the station" in the intervening week?

At a minimum, we'd like to know what the eventual functionality will be so we can plan our MDG relationship structure.

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: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #25 on: September 12, 2019, 12:22:54 pm »
Hi Eve,

Any "movement at the station" in the intervening week?

At a minimum, we'd like to know what the eventual functionality will be so we can plan our MDG relationship structure.

Paolo
[BUMP]

Is there any timeline on some sort of resolution on this, please?

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: 8061
  • Karma: +118/-20
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #26 on: September 12, 2019, 02:23:25 pm »
If I had a timeline I'd give it to you. If you want something to work now, draw the self-relationship for each specialization. That will behave like I described source.metatype.specific.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #27 on: March 03, 2020, 04:33:48 pm »
Have there been any changes in the last few versions?  I'm not aware of any, but sometimes the Sparx commentary is obscure.

Some testing I did today didn't quite match what was reported previously.

We need this sorted to allow transitioning to the model-based MDG.

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: 8061
  • Karma: +118/-20
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #28 on: March 04, 2020, 09:37:37 am »
I'm expecting all four self.metatype variants to work in 15.1.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8595
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15 - How to show self-metatype relationships in metamodel?
« Reply #29 on: March 04, 2020, 10:51:13 am »
I'm expecting all four self.metatype variants to work in 15.1.
Thanks, are you able to specify them analogously to that I published on Aug 20, 2019?  If they now work that way then a statement to that effect would be useful.

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