Book a Demo

Author Topic: Use of @Element in QuickLinker  (Read 4593 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Use of @Element in QuickLinker
« on: September 10, 2018, 05:06:54 pm »
We can use the @Element (for example) in a QuickLinker entry to allow more generic relationships specification.  Here's one entry that works...
Class,,@Element,,,Class,,Nesting,Nstng,to,nesting¯,nesting¯,True,True,,True,(Nesting),0,,,,,

Any Class can be nested within any Element.
Since any element can be nested within another element (or package - which in this context appears to be an element) we thought we'd generalize it to:
@Element,,@Element,,,Class,,Nesting,Nstng,to,nesting¯,nesting¯,True,True,,True,(Nesting),0,,,,,


However, this doesn't work.  Should it?  If not, why not?

Reported,
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: 8110
  • Karma: +119/-20
    • View Profile
Re: Use of @Element in QuickLinker
« Reply #1 on: September 11, 2018, 09:14:53 am »
I'd say the reasons why it doesn't work are implementation rather than a conceptual it shouldn't. Both the connector type and source element type need to be concrete metaclasses.

You can define a relationship like this using the metamodel functionality in EA 14.  (Define Metamodel Constraints)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Use of @Element in QuickLinker
« Reply #2 on: September 11, 2018, 10:48:20 am »
I'd say the reasons why it doesn't work are implementation rather than a conceptual it shouldn't. Both the connector type and source element type need to be concrete metaclasses.

You can define a relationship like this using the metamodel functionality in EA 14.  (Define Metamodel Constraints)
I can see the Connector type has to be concrete, but the source type?  Should I submit a bug report?

As to the metamodel functionality, we're trying to head toward that, but since Sparx don't provide an MDG reverse engineer facility, it's HARD!

Since we haven't really looked at it yet, does the new functionality create the same QuickLinker entries or not?  If so, then surely the problem still applies.

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: 8110
  • Karma: +119/-20
    • View Profile
Re: Use of @Element in QuickLinker
« Reply #3 on: September 11, 2018, 01:19:42 pm »
As I said, @Element in the source won't work for implementation reasons, not necessarily conceptual ones. EA needs the source type to be a concrete term.

The metamodel method for specifying relationships does allow it, but it works by expanding the three metatypes involved before feeding information to the quicklinker.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Use of @Element in QuickLinker
« Reply #4 on: September 11, 2018, 02:35:34 pm »
As I said, @Element in the source won't work for implementation reasons, not necessarily conceptual ones. EA needs the source type to be a concrete term.

The metamodel method for specifying relationships does allow it, but it works by expanding the three metatypes involved before feeding information to the quicklinker.
Thanks, I get it (at least the drift).

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