Book a Demo

Author Topic: finding invisible connectors  (Read 4827 times)

kofe

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
finding invisible connectors
« 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
« Last Edit: October 14, 2004, 07:59:46 am by kofe »

CJ

  • EA User
  • **
  • Posts: 288
  • Karma: +0/-0
    • View Profile
Re: finding invisible connectors
« Reply #1 on: October 14, 2004, 10:00:47 am »
G'day,

My first thought is to use the Relationship Matrix to try and identify relationships that should not exist.
Cheers and best regards.

thomaskilian

  • Guest
Re: finding invisible connectors
« Reply #2 on: October 14, 2004, 02:47:09 pm »
(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.

thomaskilian

  • Guest
Re: finding invisible connectors
« Reply #3 on: October 15, 2004, 07:54:46 am »
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.

kofe

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: finding invisible connectors
« Reply #4 on: October 22, 2004, 01:56:35 pm »
Thanks for the hint, Thomas. I'll try out once I got time to figure out how  the automation interface works.

thomaskilian

  • Guest
Re: finding invisible connectors
« Reply #5 on: October 22, 2004, 11:14:24 pm »
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).

kofe

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: finding invisible connectors
« Reply #6 on: October 25, 2004, 01:44:53 am »
Thanks again. Opened t_connector witth Access. But all DiagramIDs are 0, so that cannot be the right element, I guess.

thomaskilian

  • Guest
Re: finding invisible connectors
« Reply #7 on: October 25, 2004, 04:27:01 am »
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  :-[

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: finding invisible connectors
« Reply #8 on: October 25, 2004, 11:28:09 am »
As a connector may appear on multiple diagrams, you have to look into two tables, t_connector and t_diagramlinks.

Bruno

Quote
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.


thomaskilian

  • Guest
Re: finding invisible connectors
« Reply #9 on: October 26, 2004, 04:03:51 am »
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  :-/

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: finding invisible connectors
« Reply #10 on: October 26, 2004, 05:53:43 am »
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