Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Nick Webb on December 17, 2016, 01:08:17 am

Title: EAUML::trace and Relationship Matrix
Post by: Nick Webb 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?!
Title: Re: EAUML::trace and Relationship Matrix
Post by: qwerty on December 17, 2016, 03:36:05 am
EA version?

q.
Title: Re: EAUML::trace and Relationship Matrix
Post by: stevesavage 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);
Title: Re: EAUML::trace and Relationship Matrix
Post by: Nick Webb on January 04, 2017, 12:04:11 am
Fantastic, thank you Mr Savage  :)
Title: Re: EAUML::trace and Relationship Matrix
Post by: Eve 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.
Title: Re: EAUML::trace and Relationship Matrix
Post by: stevesavage 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.