Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: kofe on October 14, 2004, 07:58:49 am
-
Question: is there an elegant way to find connectors in the repository that do not show up in any diagram?
Background:
We have quite a big model scattered over several diagrams with many people working on it. The model is used to automatically generate a XML DTD (own tools do that).
Now I recently found that there are associations in the model that do not show up in any diagram, since the classes connected aer never shown together. Probably someone entered the connector and removed one of the associated classes from the diagram. So the connectors are still in the repository but invisible if you just check the diagrams. Many of these invisible connectors are wrong, of course and lead to errors in the generated DTD.
Brute force is to check each single class with the "Relationships" view, or to write a script that analyses the XMI export to find those "hidden" connectors. But maybe here is a more elegant solution to this problem?
Thanks,
Konrad
-
G'day,
My first thought is to use the Relationship Matrix to try and identify relationships that should not exist.
-
(Again no EA at hand since I sit in front of my Mac)
Guess that won't do the job cause there is no option to show "not shown in diagram" assocs. Isn't there an attribute "in diagram" for an assoc? So automation should do the trick - or even a simple SQL. Will try tomorrow if time permits.
-
The table is t_connector and the column is named DiagramID. Those with DiagramID = 0 do not appear in any diagram. You can find the related objects via t_object.
-
Thanks for the hint, Thomas. I'll try out once I got time to figure out how the automation interface works.
-
kofe,
you won't need the automation interface.You can find the data with Excel/Insert External Data. You then just need an ODBC connection to your EA database (Access driver).
-
Thanks again. Opened t_connector witth Access. But all DiagramIDs are 0, so that cannot be the right element, I guess.
-
You're right. At a first glance in my model it looked as if that were the right column. But at a second it seems more difficult. Probably you really have to do some programming in order to find out the desired relations :-[
-
As a connector may appear on multiple diagrams, you have to look into two tables, t_connector and t_diagramlinks.
Bruno
The table is t_connector and the column is named DiagramID. Those with DiagramID = 0 do not appear in any diagram. You can find the related objects via t_object.
-
Hi Bruno,
still that is not the full truth. I tried with an almost empty model: one diagram, two UC, one assoc. There was definitly no correlation between association being displayed on a diagram or not. Likely any assoc. is drawn if a) both related objects are in the same diagram and b) the Hidden flag is not set. So you need to go through all diagramms, check all objects and see whether all relations are really present. A simple SQL probably won't do the job :-/
-
Hi Thomas,
do not underestimate the power of simple SQL :-)
Perhaps we need to add another table to the query, t_diagramobjects. If the two objects never appear on the same diagram, the connector is invisible. If they do, the connector may be marked as hidden.
I will write the SQL when I am back at my desk and I will post it here.
Bruno