Book a Demo

Author Topic: Custom MDG and Template package - elements pickup the wrong template!  (Read 3560 times)

PeteC

  • EA User
  • **
  • Posts: 91
  • Karma: +1/-0
    • View Profile
I have created a custom MDG and within a model using that MDG defined a Template package to define how some elements appear. But depending on the metaclass of my stereotype elements are wrong...

What I was trying to do:

  • Create a Stakeholder stereotype from the Actor metaclass
  • Create a Stakeholder Group stereotype from the Actor metaclass (a second instance of the metaclass)
  • Template the Stakeholder Group element in rectangle notation
  • Create two custom diagrams, one with the Stakeholder in the toolbox and one with Stakeholder Group in the toolbox

What happens is that when I drop either a Stakeholder or a Stakeholder Group onto their respective diagrams that they appear in rectangular notation (correct for the Stakeholder Group, but not for the Stakeholder that should be appearing as a stick-man/person). Also, the Stakeholder is given two stereotypes - Stakeholder and Stakeholder Group.

Without the Template defined, the Stakeholder appears correctly, with only the Stakeholder stereotype.

As a test, I redefined Stakeholder Group to be derived from a UseCase metaclass (not because I want to but because it also has a rectangle notation option and I have another element that is derived from UseCase).
With this test, I can define my templated Stakeholder Group in rectangle notation, when I drop a Stakeholder on it's diagram it appears as a stick-person, a Stakeholder Group on it's diagram appears as a UseCase in rectangle notation and a Use Case on it's diagram appears as an oval UseCase. All I've done is to drag the Extension relationship from the Actor to the UseCase metaclass and EA behaves differently.

I would ideally like to treat the Stakeholder as an Actor (it is intended to be a group of Actors and in other diagrams may want to behave as an Actor for assigning relationships).

I cannot see anything I have done wrong - can anyone shed light on something I might have overlooked or a reason why EA behaves differently when assigning custom stereotypes and/or templates to an Actor?

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Custom MDG and Template package - elements pickup the wrong template!
« Reply #1 on: February 26, 2021, 08:52:16 am »
A few things to check:

1. If there a Generalization between "Stakeholder" and "Stakeholder Group" remove it and try again
2. Try again with "StakeholderGroup" (no space)
3. Try again with "Snakeholder" (or some other spelling that isn't a substring of "Stakeholder Group")

If 1 works, all is good. If 2 and/or 3 works, please send in a bug report. If none work, please send your technology file to Sparx support and we will try to figure out what's wrong.
The Sparx Team
[email protected]

PeteC

  • EA User
  • **
  • Posts: 91
  • Karma: +1/-0
    • View Profile
Re: Custom MDG and Template package - elements pickup the wrong template!
« Reply #2 on: March 02, 2021, 09:42:53 pm »
1. is not true - no generalisation. (I also created a mini project with just these two elements defined so that I could be sure that I was not causing the issue elsewhere!)
2. No difference
3. Solved it, so looks like a substring is matching. I'll raise a bug report.

Also, EA 14.1 worked so something has been introduced since then that causes the fault.