Book a Demo

Author Topic: stereotypedrelationship does not create stereotype from QL  (Read 15552 times)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
stereotypedrelationship does not create stereotype from QL
« on: November 10, 2021, 03:21:22 am »
I have defined a stereotypedrelationship (from a stereotyped Activity to a stereotyped SendEvent and also towards another Activity). When I use the QL it offers my relation with both elements. Creating the Activity results in the stereotyped one as desired. But the SendEvent is created without any stereotype. Just another bug? Would it be fixed?

q.

P.S. I just notice that the QL does not offer all of my definitions. One is just missing :-/
« Last Edit: November 10, 2021, 03:23:10 am by qwerty »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: stereotypedrelationship does not create stereotype from QL
« Reply #1 on: November 10, 2021, 10:19:22 am »
Hard to say what's going on without seeing your profile.

I'm not exactly sure what metaclass you're using. I know the Event metaclass can be Send or Receive, and neither actually exists in UML. The UML item is SendSignalAction and AccentEventAction.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: stereotypedrelationship does not create stereotype from QL
« Reply #2 on: November 10, 2021, 09:39:52 pm »
I can only take what EA offers (like with Object). (it would be sooo much easier to explain things if there were an image upload in this stone age forum.) So my metaclass is SendEvent/ReceiveEvent from which my stereotypes are extending. I have a stereotyped Activity from/to these event stereotypes. When I take the offering from dragging to a blank space it shows the Event but creates it without the stereotype. Just the pure element. In contrast I have another stereotyped activity linked the same way and EA does create the element with stereotype correctly.

The part of the xml looks like
Code: [Select]
<Stereotype name="receive" metatype="Receive event" notes="" cx="0" cy="0" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
<stereotypedrelationships>
<stereotypedrelationship stereotype="Prof Base 3::control flow" constraint="Prof Functional 3::use case activity"/>
</stereotypedrelationships>
<AppliesTo>
<Apply type="ReceiveEvent"/>
</AppliesTo>
</Stereotype>
<Stereotype name="send" metatype="Send event" notes="" cx="0" cy="0" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
<Image type="EAShapeScript 1.0" xmlns:dt="urn:schemas-microsoft-com:datatypes" <AppliesTo>
<Apply type="SendEvent"/>
</AppliesTo>
</Stereotype>
...
<Metamodel/>
I wonder why there's only one stereotypedrelationship listed in that profile, but EA offers more in the drag-to-blank list.

I'm feeling like the sorcerer's apprentice only that it feels more like black than white magic.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: stereotypedrelationship does not create stereotype from QL
« Reply #3 on: November 11, 2021, 08:37:32 am »
I'm not offered 'Send event' or 'Receive event' by the metaclass dialog and I can't find any reference to that existing.

If either of those made it into the database EA wouldn't even know how to create one.

That just means that the problem started before you exported and the problem won't be fixed without changing your model. My recommendation would be to change your metaclasses to SendSignalAction and AcceptEventAction. These are the actual UML names for those items and I have seen less issues for them than using "Send" or "Receive" which are a legacy of older UML versions.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: stereotypedrelationship does not create stereotype from QL
« Reply #4 on: November 11, 2021, 09:19:53 am »
Good point. I tried in V13.5 and even there I only find Send. Now, ask me how that came into our profile. I first did suspect a colleague, but no: I created that exactly 2 years ago. Hmmm, scratching my head. Thanks a bunch! I will see what the Send will do for me. Hope the best.

Intersting though, that EA creates a Send/Receive (only without the stereotype) based on a wrong metaclass. Hope that makes you scratch your head too ;-)

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: stereotypedrelationship does not create stereotype from QL
« Reply #5 on: November 11, 2021, 09:55:49 am »
Holy crap! I changed the metaclass and now it still creates the unstereotyped element. Plus it croaks that the connector is invalid (like in the other bug I reported). It might well be too late for me and I might very well made some crap myself. Nonetheless I find it remarkably poor that EA does not croak upon wrong metaclass usage or any user error introduced in a profile. It just silently ignores any errors and runs against the next wall. Leaving the user with a bloody nose :-/

q.

P.S. interesting though, EA now creates the correct drag-to-blank labels.
« Last Edit: November 11, 2021, 09:58:35 am by qwerty »