Book a Demo

Author Topic: Quicklinkers using abstract metatypes  (Read 11371 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Quicklinkers using abstract metatypes
« on: May 01, 2021, 03:44:01 pm »
Hey all

Just wondering what happens if I specify an abstract metatype in my stereotype and then use that to specify a Quicklinker.

Will that actually work? Or will Sparx just go nope?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #1 on: May 01, 2021, 07:11:03 pm »
Hey all

Just wondering what happens if I specify an abstract metatype in my stereotype and then use that to specify a Quicklinker.

Will that actually work? Or will Sparx just go nope?
Hi Jays,
The only thing that an abstract metatype seems to do is stop the item from being draggable off the toolbar.  We've made extensive use of abstract metatypes in our hierarchy to specify appropriate inheritance hierarchies for our metamodel.  In fact, the main root item (at the very top of the hierarchy) is an abstract metatype.  It specifies all the relationships that EVERY item may partake in.  Works well.  I'd have to check, but I think our process is to make a metatype abstract until we need to turn it into an item that needs to be created/applied from the toolbar.

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

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #2 on: May 03, 2021, 07:33:57 am »
Hey Paolo

Thanks for that. I think you might have answered ANOTHER question I probably would have asked eventually rather than the one I intended.
Am I correct in assuming you are talking about making the Stereotype abstract rather than individual metatypes that belong to it?

What I was referring to are the Abstract Metaclasses you can add using the profile helper.
For example ActionExecutionSpecification, ActionInputPin, ActivityEdge, etc....

I was wondering what happens (if anything) if I include THOSE in the Quicklinker.

Cheers

Jays :-)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #3 on: May 03, 2021, 10:57:14 am »
Hey Paolo

Thanks for that. I think you might have answered ANOTHER question I probably would have asked eventually rather than the one I intended.
Am I correct in assuming you are talking about making the Stereotype abstract rather than individual metatypes that belong to it?

What I was referring to are the Abstract Metaclasses you can add using the profile helper.
For example ActionExecutionSpecification, ActionInputPin, ActivityEdge, etc....

I was wondering what happens (if anything) if I include THOSE in the Quicklinker.

Cheers

Jays :-)
Hi Jays,
We may be talking at slightly cross-purposes.  As you probably know, I'm a literalist  ;D.  An abstract metatype and an abstract metaclass are not the same thing in our ontology!  We have used both.  So we have some stereotypes that don't have a  _metatype property and may to may not have the abstract property set.  Those that do are designated simple abstract stereotypes.  Other stereotypes are assigned a _metatype property and may or may not be marked as abstract.  Those that are, are designated abstract metatypes

We also have metaclasses that can be added via the profile helpers. One section is designated "Abstract Metatypes" (for reasons best known to Sparx - since they are neither abstract (that is they don't have the abstract property set) nor are they metatypes (that is they are not a specific stereotype applied to a specific type yielding a specific metatype)) which seem to be just other types of metaclasses.  We don't use these yet, although we have similar concepts not fully used via the abstract stereotypes mentioned above from which concrete metatypes can inherit properties and behaviour.

We use metaclasses to allow our metatypes to be draggable from the toolbox (that is, to generate the <ApliesTo/> section).  From our experience, setting the abstract property for a metaclass seems to make NO difference to the behaviour of the metatype - and so none of our metaclasses is currently abstract.

Since QuickLinker (as far as we can tell) really only use the stereotypes (maybe it's just the metamodel we use), we don't use metaclasses for such work.

Does that help any (or just confuse you more)?
Paolo
« Last Edit: May 03, 2021, 10:59:29 am 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: 8110
  • Karma: +119/-20
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #4 on: May 03, 2021, 01:13:26 pm »
The first question I have is what method are you using to define your quicklinks?

https://sparxsystems.com/enterprise_architect_user_guide/15.2/modeling/quick_linker_definition_format.html
or
https://sparxsystems.com/enterprise_architect_user_guide/15.2/modeling/metamodel_constraints_quicklinker.html

If it's the former (and I hope it isn't) the only field that will accept an abstract UML type is column C, when prefixed by '@'. All the other columns that take a UML type need the exact type specified.

If it's the latter, metarelationship or stereotyped relationship targeting either a stereotype or metaclass (uml type) it will be automatically expanded. If the target stereotype extends an abstract metaclass it will get confused when you tell the quicklinker to create that stereotype though. Stereotypes with that pattern are generally more useful in that the stereotype dialog will show them as available whenever you are currently editing an element that is a specialized form of that type.

One section is designated "Abstract Metatypes" (for reasons best known to Sparx - since they are neither abstract (that is they don't have the abstract property set) nor are they metatypes (that is they are not a specific stereotype applied to a specific type yielding a specific metatype)) which seem to be just other types of metaclasses..
They are the types in the UML metamodel that are marked as abstract. In order to use one you would also need to specify which specialized type you are using. (eg. Behavior can be Activity, Interaction, StateMachine) EA doesn't care if you mark such a metaclass as abstract or not, it knows that from its internal metamodel.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #5 on: May 11, 2021, 04:15:34 am »
Righto

Sorry for not responding earlier, but there is a LOT to digest there.

In asnwer to your first question, I am trying to do it with BOTH/EITHER. I know that QuickLinkers have a (deservedly) bad reputation but the truth is that they have more functionality that sometimes I just need.

Now, onto some points of clarification:

1. You said that QuickLinkers only accept "@" in column C, but the documentation says that Column A will accept @ as well. A mistype?
2. Can you look at the following scenarios and tell me if my assumptions are correct?

QuickLinker
=======
Scenario 1:
=======
If we look at TemplateableElement, it has a number of direct and indirect sub-classes, including:

StringExpression, Package, Profile, Model, Operation, etc...

If I put @TemplateableElement in Column A (or C), does that mean that any of it's CONCRETE metaclasses (such as Operation) will evaluate true for the QuickLinker?

Sceanrio 2
=======
For Column H (new link metaclass), if we have a Stereotype (MyStereo) with an abstract connector metaclass (such as Realization).

Is is correct that I can put any CONCRETE metaclass in column H?
For example, if I put Substitution in Column H then this Quick Linker will create a New Connector MyStereo:Substitution. Is that correct?

Scenario 3
=======
If we look at Association (a CONCRETE metaclass), which has a number of subclasses such as Extension, CommunicationPath, etc.
If I put Association into columns A or C, does that mean that it will also accept any of it's sub-classes?
Or does it only work with abstract metaclasses?


MetaRelationship & Stereotyped Relationships
=============================
When you say "it will be automatically expanded", I'm assuming you mean that it will include all the direct and indirect sub-classes of the abstract metaclass?


Other Questions
==========
If we look at ActionExecutionSpecification as an example, it is Abstract and the UML specification shows no direct sub-classes.
If it has no CONCRETE subclasses, what can we possibly use this metaclass for?

The CollaborationLink metaclass doesn't appear in the UML specification at all. Whats up with that?

As far as I can see, Action is listed in the UML specification as Abstract but is not shown in the "Abstract Metaclass" section in the profile helper. Once again, wassup with that?




Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #6 on: May 11, 2021, 08:19:32 am »
Hi Jays,

Not to "rain on your parade", but I think you're on a "hiding to nothing".  By trying to use the OLD QuickLinker specifications you're trying to purchase a "sleeping parrot" from the pet shop 1.  After more than a decade of trying (and mostly succeeding) to use the old process, we switched over about 6 months ago and haven't looked back.  Notwithstanding there are still some annoying issues with the new process, it's SO much better.'

As you've observed - "here be dragons" and the silent failure modes of EA, particularly in this area are tough.

Give it away mate!  Save your sanity!
Paolo


1 Just in case you're not familiar with the reference, see :https://www.dailymotion.com/video/x2hwqnp
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #7 on: May 11, 2021, 04:54:42 pm »
I might give that a shot in the near future. I alway wondered how ANYONE ever would have dealt with that dreaded table. I had a look in a former EA version where the internal table is stored. I always wondered what kind of Gulag it must be to be responsible for that beast. Probably the Sparxians had some kind of punishment rule like "if you don't praise G. once a day you're sent to the QL table maintenance" (sort of kidding).

q.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #8 on: May 11, 2021, 05:22:32 pm »
QL maintenance table?????
What is that and how do I view it????

Cheers

Jays

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #9 on: May 11, 2021, 09:09:33 pm »
It's the definition (or at least has been) inside EA for the Quick Linker combinations you see in using EA. You can see it by opening EA.exe (at least 13.5) with Notepad++ (or the like) and searching for the table header. IIRC it is stored as CSV. I just remember that it was HUGE.

q.

P.S. E.g. 13.5 on line 313311 it has a length of 113878 bytes. There are more such definitions in other internal profiles.
P.P.S 15.2 does no longer have these in its stomach. They might well be somewhere in those MDG files lurking in several folders of EA.
« Last Edit: May 11, 2021, 09:21:27 pm by qwerty »

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #10 on: May 12, 2021, 03:36:41 am »
Well getting hold of that resource would be GOLD.
Eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeve? Are you able to point this out to me?
If not, can you answer the Qs above?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #11 on: May 12, 2021, 03:50:59 am »
Well, I told you where it is. Copy/paste it and convert the HTML to ASCII. There you go. Good luck...

q.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #12 on: May 12, 2021, 04:25:01 am »
Yeah, I know in 13.5 but I am guessing this information "rusts" over time?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #13 on: May 12, 2021, 06:34:43 am »
Well, no. This is EA. The DB structure for example is merely unchanged since 2003 or so. But as Paolo hints: are you some kind of masochist to torture yourself by dealing with that quick linker?

q.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Quicklinkers using abstract metatypes
« Reply #14 on: May 12, 2021, 06:58:50 am »
Honestly q, nobody ever accused me of being smart ;-)

Truth is I am building an app to auto-gen MDGs and am actually a LONG way advanced.
The answers to the questions in this post are one of the few stumbling blocks to completion.

Cheers :-)