Author Topic: EAUML::trace and Relationship Matrix  (Read 6947 times)

Nick Webb

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
EAUML::trace and Relationship Matrix
« on: December 17, 2016, 01:08:17 am »
Slightly confused - in a relationship matrix I select the trace relationship type and link 2 elements.  However on clicking refresh the relationship vanishes.  On checking the link type I see an abstraction link with stereotype EAUML::trace is created so it's thrown me a bit.

- What am I missing please?!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: EAUML::trace and Relationship Matrix
« Reply #1 on: December 17, 2016, 03:36:05 am »
EA version?

q.

stevesavage

  • EA User
  • **
  • Posts: 119
  • Karma: +4/-0
    • View Profile
Re: EAUML::trace and Relationship Matrix
« Reply #2 on: December 21, 2016, 02:47:35 am »
I had the same issue, and this is the fix info from Sparx EA:

"We had a similar report and found that the issue was caused by a stereotype which had been defined in the project "UML Types". Please try the following...
Open the project which is having the issue, then open the UML Types dialog (via "Configure > Reference Data > UML Types"). In the list of stereotypes, locate the "EAUML::trace" stereotype (see attached) and delete it. Trace connectors should be created correctly (if not, please let us know)."

For trace relationships that you've already created, that have the wrong stereotype, I wrote a quick jScript script to fix them.

var updateSQL = "UPDATE t_connector SET t_connector.BTM_MID_LABEL = '«trace»', t_connector.Stereotype = 'trace' WHERE t_connector.Stereotype = 'EAUML::trace'"
Repository.Execute(updateSQL);

Nick Webb

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: EAUML::trace and Relationship Matrix
« Reply #3 on: January 04, 2017, 12:04:11 am »
Fantastic, thank you Mr Savage  :)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: EAUML::trace and Relationship Matrix
« Reply #4 on: January 04, 2017, 08:34:43 am »
Careful with those direct db updates. The previously listed 'answer' will end up with the connectors having two stereotypes. 'trace', (which may or may not be from the EAUML profile) and 'EAUML::trace' (with that exact name and not coming from a profile.)

Code: [Select]
var updateXref = "update t_xref set Description='@STEREO;Name=trace;FQName=EAUML::trace;@ENDSTEREO;' where [Type]='connector property' and Name='Stereotypes' and Client in (select ea_guid from t_connector where Stereotype='EAUML::trace')";
Repository.Execute(updateXref);
var updateConn = "UPDATE t_connector SET t_connector.BTM_MID_LABEL = '«trace»', t_connector.Stereotype = 'trace' WHERE t_connector.Stereotype = 'EAUML::trace'"
Repository.Execute(updateConn);

If you've already run the previous update, changing my first sql to update t_xref for all connectors with the stereotype of 'trace' will correct them. But if you've intentionally used multiple stereotypes or used 'trace' from another profile you'll lose those.

stevesavage

  • EA User
  • **
  • Posts: 119
  • Karma: +4/-0
    • View Profile
Re: EAUML::trace and Relationship Matrix
« Reply #5 on: January 07, 2017, 11:09:49 am »
Thanks Simon, I didn't realize that the stereotypes for connectors were also being stored in the t_xref, will run your fix.