Book a Demo

Author Topic: Problem with overlapping stereotypes  (Read 4534 times)

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1000
  • Karma: +58/-18
    • View Profile
Problem with overlapping stereotypes
« on: January 18, 2017, 03:38:40 am »
The initial problem came when I tried to force a project to move from V12 to V13.

Within that project there are some stereotypes defined in “UML Types” with some default colors. After using V13 some elements did not show those colors.

After looking on that I realized that this happens on elements using stereotype names defined twice. Once in a MDG technology and once in “UML Types”.

So it seem that in V12 layout defined in “UML Types” wins but in V13 the MDG wins.

My idea was to use a script having in my script library to remove the MDG stereotype from the elements, but according sterotypeEx the element has got one stereotype only, but when looking in the element properties dialoged on such an element two stereotypes are checked (stName and MDGName::stName).

Any idea how to get rid of  MDGName::stName by script or at least to make stName color win again?
Best regards,

Peter Heintz

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Problem with overlapping stereotypes
« Reply #1 on: January 18, 2017, 04:35:59 am »
Probably the best idea is to refactor and no longer use duplicate names.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8090
  • Karma: +118/-20
    • View Profile
Re: Problem with overlapping stereotypes
« Reply #2 on: January 18, 2017, 11:32:03 am »
Version 12 and earlier failed stereotype profile resolution in some cases. The ended up meaning it the wrong stereotype.

It's surprised me how many people had taken advantage of this bug to override behavior from a profile stereotype within a model.

The one person I've talked to enough to work out exactly what was going on had used a third party tool to generate their MDG technology, which didn't support shape scripts. As a result they copy and pasted their shape scripts into every model that they used their technology.

Is there a reason you didn't define the colours in the original MDG technology? I'd imagine that in order to use that in different models in version 12 you would have also needed to copy the additional stereotype definitions.

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1000
  • Karma: +58/-18
    • View Profile
Re: Problem with overlapping stereotypes
« Reply #3 on: January 19, 2017, 03:33:59 am »
I am not really involved in that project. I only want to support them to remain happy after switching to V13.

I suppose that those guys started using the third party MDG having stereotypes like <<electrical>> and <<mechanical>> but later they decided to need different colors for those stereotypes.
Because of this MDG is third party, they just added the same stereotypes in the project Reverence Data with colors and it worked in V12 but not in V13 anymore.

I am personally not a fan of this coloring at all, but anyhow I want to support them to get rid of the MDG stereotypes by deleting those from each element but not by clicking around of thousands of elements. Unfortunately scripting tells me (stereotypeEx) there is only one stereotype assigned.

I am just looking for a way to remove those MDG stereotypes and keep the Reference Data stereotypes by a script.
Best regards,

Peter Heintz

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Problem with overlapping stereotypes
« Reply #4 on: January 19, 2017, 04:13:51 am »
You need to modify t_xref with those stereotypes. Maybe it's enough to remove the entries so EA falls back to its roots. Eventually you have to modify the entries. As you probably know: try in the sandbox and make backups.

q.

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1000
  • Karma: +58/-18
    • View Profile
Re: Problem with overlapping stereotypes
« Reply #5 on: January 20, 2017, 08:12:09 pm »
Thank you querty
You mean I should delete in t_xref those entries were in the Description I find my MDG stereotypes I want to get rid of, right?
At least this was one of two options I already thought about.
Best regards,

Peter Heintz

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Problem with overlapping stereotypes
« Reply #6 on: January 20, 2017, 08:35:28 pm »
Yes, that's the idea. Try it in a sandbox and see if it has the desired effect.

q.