Book a Demo

Author Topic: Changing Stereotype between MDG Technologies  (Read 5515 times)

BruceTOGAF2

  • EA User
  • **
  • Posts: 74
  • Karma: +0/-0
    • View Profile
Changing Stereotype between MDG Technologies
« on: August 18, 2020, 09:08:03 pm »
I have 2 MDG Technologies "Data Architecture" and "Defra Data Architecture MVP".  Both MDGs contain a stereotype "Conceptual Data Entity" that are different from each other.
I have an element with FQStereotype "Data Architecture::Conceptual Data Entity" because it was created from a stereotype "Conceptual Data Entity" defined in a MDG Technology "Data Architecture"
StereotypeEx does not differentiate "Conceptual Data Entity" ("Data Architecture") from "Conceptual Data Entity" ("Defra Data Architecture MVP").
I want to change the stereotype of this element so that it has the stereotype "Conceptual Data Entity" defined in MDG Technology "Defra Data Architecture MVP".
The following Jscript code tries to change the FQStereotype to "Defra Data Architecture MVP::Conceptual Data Entity"
currentElement.FQStereotype = "Defra Data Architecture MVP::Conceptual Data Entity";
EA responds with "Unable to write read-only property"
How can I change the stereotype of the same element so that it has the stereotype "Conceptual Data Entity" defined in MDG Technology "Defra Data Architecture MVP"?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Changing Stereotype between MDG Technologies
« Reply #1 on: August 18, 2020, 09:43:53 pm »
As answered in your dup-post: stereotypeEx is the field where to put that.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Changing Stereotype between MDG Technologies
« Reply #2 on: August 18, 2020, 09:47:34 pm »
As Q says, you need to update StereotypeEx. FQStereotype is a convenience read-only property.

However, there is no way to distinguish two stereotypes with the same name from profiles with the same name from different technologies.
The result is undefined.

/Uffe
My theories are always correct, just apply them to the right reality.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Changing Stereotype between MDG Technologies
« Reply #3 on: August 19, 2020, 11:06:10 am »
StereotypeEx does not differentiate "Conceptual Data Entity" ("Data Architecture") from "Conceptual Data Entity" ("Defra Data Architecture MVP").
Yes it does you need to prefix with MDG.
i.e. try
StereotypeEx = "Defra Data Architecture MVP::Conceptual Data Entity";
Happy to help
:)

BruceTOGAF2

  • EA User
  • **
  • Posts: 74
  • Karma: +0/-0
    • View Profile
Re: Changing Stereotype between MDG Technologies
« Reply #4 on: August 21, 2020, 11:03:06 pm »
Thank you querty, Uffe and Sunshine. Your solution works well.