Book a Demo

Author Topic: stereotypedrelationship between metaclasses  (Read 10622 times)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
stereotypedrelationship between metaclasses
« on: November 01, 2021, 12:58:55 am »
The help tells
Quote
You can use a «stereotypedrelationship» connector between two Stereotypes or Metaclasses to specify a valid stereotyped connector between instances of those elements.
but it does not work. The quick linker does not show the connector. The profile contains
Code: [Select]
<Metamodel>
<Metaclass name="Artifact" notes="">
<stereotypedrelationships>
<stereotypedrelationship stereotype="MyProfile::represent" constraint="Artifact"/>
</stereotypedrelationships>
</Metaclass>
</Metamodel>
So why doesn't my connector not show up in the quick linker?

As a side question: using _HideUmlLinks will not show any of the inherited UML links. But how would I go about showing just certain ones. My guess: does not work.

q.
« Last Edit: November 01, 2021, 10:03:43 pm by qwerty »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: stereotypedrelationship between metaclasses
« Reply #1 on: November 01, 2021, 10:53:22 am »
The first thing that comes to mind is the toolbox filter.

If your connector type is not available in the current toolbox it won't be offered as a suggestion. Equally, you won't be prompted to create new elements that don't exist on the toolbox. From a practical perspective, that means if you're on a base UML diagram you won't get your stereotyped connectors offered without turning off the filter (from within the quicklinker menu.)

The toolbox filter comes from the concept of views that exist in multiple languages. They specify what elements and relationships the view is intended to show. EA allows you to define that using the diagram/toolbox pair, but also by defining a view specification. The latter means that you could define in your profile an "artifact representation" view for a base UML diagram. You can then select that and those are the things that will be offered in the quicklinker.

For your second question. _HideUmlLinks isn't intended as a mix and match. It's used when you're defining a completely different language such as we have done for ArchiMate. You could still use it and then redefine the relationships that you want to show.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: stereotypedrelationship between metaclasses
« Reply #2 on: November 01, 2021, 06:07:32 pm »
When I turn off the filter I see a lot more connectors. But still the one I defined is not in the list. And of course the toolbox does show the connector.

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: stereotypedrelationship between metaclasses
« Reply #3 on: November 01, 2021, 07:02:34 pm »
Out of curiosity I added a stereotypedrelationship with that relation for one of my stereotypes. It also does not appear. So I'm asking for a proof of concept. Is there any working example profile where I can start from to get me up and running? (I have written the answer in a sealed envelope and it is to be opened end of this year)

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: stereotypedrelationship between metaclasses
« Reply #4 on: November 01, 2021, 07:37:43 pm »
I think I can just burn the envelope. I added a constraint somewhere else. Guess what: it worked. So what is it? You guessed right again: one of these bugs. I like that song from Pink Floyd "One of these days(, I'm going to cut you into little pieces)" In the meantime I will worship in the unholy church of the bug fix to come. Maybe some blood in a druid circle will help. Poured over the ashed of my envelope.

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: stereotypedrelationship between metaclasses
« Reply #5 on: November 01, 2021, 09:11:51 pm »
I just notice that the Metaclass wizard lists the profile in question twice in the drop down. Bug, bug, but different. I think most of it boils down to the fact that EA does not have the least logging facility. I'm somehow used to that (when stereotypes don't work I do have an idea where to look). This is a different mine field...

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: stereotypedrelationship between metaclasses
« Reply #6 on: November 01, 2021, 10:03:27 pm »
Halleluja! The blood helped.

The reason is actually the non-existing logging in EA. What happened? Simply spoken I have my MDGs in the Advanced path where I refresh them for new builds. For testing purpose I renamed one of the xml files to Copy.xml in order to see differences with Winmerge and then simply forgot about this file. Now, EA looked into the files and silently loaded that old temporary xml first and my newly build MDGs later. So it had both loaded. Silently with the same profile names and versions. Both were listed under Resources (once I manages to look right there(!)). Obviously it took the elder version or just had hickups. Who knows?

Now, after I removed this dead copy it works again.

Lesson? Just fall on your nose until it bleeds and the blood eventually drips into a druid circle.

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: stereotypedrelationship between metaclasses
« Reply #7 on: November 02, 2021, 12:12:26 am »
Hum, hum, ... What's that creepy feeling I have? While some connectors now show as they should (there's another lot of things that ought to be fixed, but that aside) I now again have a connector not showing up. Any hint from EA what might be wrong? Is the hell cold?

Well, while typing this I noticed a typo in the stereotype. I fixed that but still no luck. This silence...

Also: why would one need to textually specify the stereotype? There IS a list of available stereotypes from which one should be allowed to pick. That would at least avoid silly typos from a silly text dialog. Well, well, but where's the bug hidden still?

q.

P.S. Aaah. Now it was Eve's first assumption. In this case the filter to toolbox was the culprit. This is really a cobbly way.
« Last Edit: November 02, 2021, 12:16:41 am by qwerty »