I wonder if anyone can explain this - a variation of Paulo's question in
https://www.sparxsystems.com/forums/smf/index.php/topic,41578.0.htmlI have a simple MDG "Stakeholders", with a toolbox which contains a type 'Stakeholder'.
When I drop it into my diagram, all is well: there is an entry in t_xref with the correct stereotype:
@STEREO;Name=Stakeholder;FQName=Stakeholders::Stakeholder;@ENDSTEREO;
Now I edit the element. OK, so I'm using my own editor, but all I'm doing in this test is changing the value of a test tagged value from 'hello' to 'hello world'.
Everything else in the element stays the same.When I come to update the element, I copy all the fields from the UI to the Ea.Element fields like a good boy, including StereotypeEx.
Now I haven't edited the stereotype, but the code doesn't know that, and my general-purpose 'save all the changes' code updates all the EA fields which MIGHT have been edited (ok, I could check...), so I set ea.element.stereotype = "Stakeholder", and, for good measure, StereotypeEX = "Stakeholder". (From the above post, I now see I should make StereotypeEx = "
Stakeholders::Stakeholder", which makes everything OK. But stay with me....)
Then I update the element.
If I choose to set 'StereotypeEx' then my element magically acquires a new MDG: '
BIZBOK'.
So t_xref looks like:
@STEREO;Name=Stakeholder;FQName=
BIZBOK::Stakeholder;@ENDSTEREO;
This is a concern: BIZBOK::Stakeholders look different in the diagram - so the user is confused - and, as they have a different MDG, lots of other stuff now doesn't work.
Now that I know about this, I can work around it, but what's happening here? Why change the MDG at all, and why to this 'BIZBOK' MDG - what's special about this ?