Book a Demo

Author Topic: SQL Queries, Connectors, and 'Find in Diagram'  (Read 60675 times)

EA Newbie

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
SQL Queries, Connectors, and 'Find in Diagram'
« on: April 15, 2025, 12:14:46 am »
I am currently running Sparx EA 15.2

I couldn't find an answer elsewhere, but I may not be asking the right questions. My apologies if the answer is obvious and already answered elsewhere.

I have a SQL Query that lists objects as an output in a model view. One of the features of this list is in edit view I can right click and select 'Find in Diagram' and it will pull up the diagrams the object is located in. I can find where an object is used in multiple diagrams and use this to search for potential overlap, redundancy, or opportunity for collaboration.

I have a SQL Query that lists connectors. The connectors are information flows (X document for review, X request for more information, etc.). The idea for listing these connections in a model view is to also search for potential overlap, redundancies, collaboration opportunities. If two different parts of my organization are talking to the same external agency, I would like to be able to locate it and potentially consolidate it. When I put the model view in 'edit view', and I right click on a connector, the option for 'Find in Diagram' is grayed out. One work around I was given was 'Display in Search View' and this worked, somewhat at first. Initially, in search view I could right click, 'Find in Diagram' and navigate to where a connector was from the search list. I'm not sure why, but the feature has stopped working. Maybe I changed something about the SQL Query when trying to get it to 'Find in Diagram' from the model view.

I would provide the SQL Queries I'm using, but I'm unsure what I can share out of my database in my current role. Does anyone know how to write a SQL Query that would accomplish what I'm asking Sparx to do? Or is it not a possibility because of how the database is set up?

Thank you for your time and your help!


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: SQL Queries, Connectors, and 'Find in Diagram'
« Reply #1 on: April 15, 2025, 12:26:45 am »
AFAIK there is no easy way to get the diagrams a connector is shown on.

I added that feature to my EA Navigator add-in for that reason.

Geert

PS. In general there shouldn't be an issue sharing the sql queries you are using on this forum, but check with your +1 if you are not sure.

Ralph Hains

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: SQL Queries, Connectors, and 'Find in Diagram'
« Reply #2 on: May 10, 2025, 01:48:48 am »
Perhaps this is something specific to Model Views? I use the following SQL for searching (not in a ModelView) a SysML model  for SysML connectors and determining if they have been "typed" (by Associations). Right click "Find in Diagrams" isn't greyed out, and works partially (it lists the diagrams the connector could be shown on, and if they actually show the connector it does select it on the diagram, whereas if the connector is hidden on the diagram it just opens the diagram. I should say I am using EA 16.1 so it is also possible things have moved on.

SELECT
   c.ea_guid AS CLASSGUID,
   c.connector_type AS CLASSTYPE,
   't_connector' AS CLASSTABLE,
   c.name As connector_name,
   c.PDATA2,
   a.name As association_name,
   c.direction,
   -- o_src.name as source_name,
   c.sourcerole,
   c.sourcecard,
   c.sourcestereotype,
   -- o_target.name as target_name,
   c.destrole,
   c.destcard,
   c.deststereotype
FROM
   t_connector c
LEFT JOIN
   t_connector a ON c.PDATA2 = a.ea_guid
WHERE c.connector_type = 'Connector';

Sadly I am not permitted to use Geert's EA Navigator, It would be really useful!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: SQL Queries, Connectors, and 'Find in Diagram'
« Reply #3 on: May 10, 2025, 04:54:57 pm »
Ah, I see. I didn't even know that EA did the "find in diagrams" for connectors.

It didn't used to, but that was before the "AS CLASSTABLE" was available.

Anyhow, it's quite possible that the behavior differs from the search windows and the model view.

Geert

PDC

  • EA User
  • **
  • Posts: 118
  • Karma: +5/-0
  • Systems Engineer
    • View Profile
Re: SQL Queries, Connectors, and 'Find in Diagram'
« Reply #4 on: May 16, 2025, 05:50:09 pm »
Ah, I see. I didn't even know that EA did the "find in diagrams" for connectors.
It didn't used to, but that was before the "AS CLASSTABLE" was available.

This potentially marks a step change in the way Connectors/Relationships are treated in EA... are you aware of anything else different like this? There's been plenty of bellyaching in this forum in the past about how Connectors/Relationships are treated as lesser than Elements but this could be the start of something potentially really useful and exciting (to sad lonely people like me :D )
Phil

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: SQL Queries, Connectors, and 'Find in Diagram'
« Reply #5 on: May 16, 2025, 06:35:20 pm »
Ah, I see. I didn't even know that EA did the "find in diagrams" for connectors.
It didn't used to, but that was before the "AS CLASSTABLE" was available.

This potentially marks a step change in the way Connectors/Relationships are treated in EA... are you aware of anything else different like this? There's been plenty of bellyaching in this forum in the past about how Connectors/Relationships are treated as lesser than Elements but this could be the start of something potentially really useful and exciting (to sad lonely people like me :D )

I wouldn't get too excited just yet. AS CLASSTABLE was introduced a couple of years ago, and I haven't seen much change yet in the treatment of connectors.

Geert

Ralph Hains

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: SQL Queries, Connectors, and 'Find in Diagram'
« Reply #6 on: May 19, 2025, 08:50:13 pm »
I'll second PDC's desire for "first class" relationships. I could particularly do with a #CurrentConnectorID# after which I could do some of it myself. Including a "Find in Diagrams" for Connectors. Of course Geerts' Navigator would give me a route to this and more but IT say "no"  >:(.
Aside: Many years ago I wrote the equivalent of Geerts' Navigator for (whisper it) another tool. I called it "TellMe" but Navigator is a better name (I guess that "Model Inspector" coves both the navigational and other data extraction aspects)

MichPaule

  • EA User
  • **
  • Posts: 70
  • Karma: +0/-0
    • View Profile
Re: SQL Queries, Connectors, and 'Find in Diagram'
« Reply #7 on: May 19, 2025, 09:07:10 pm »
Aside: Many years ago I wrote the equivalent of Geerts' Navigator for (whisper it) another tool. I called it "TellMe" but Navigator is a better name (I guess that "Model Inspector" coves both the navigational and other data extraction aspects)
You are the author of TellMe?
Then you saved my a$$ a lot of times.
Thanks a lot for this tool!
Now - after migration to EA - there are times where I really miss it but there are alternatives around...

PDC

  • EA User
  • **
  • Posts: 118
  • Karma: +5/-0
  • Systems Engineer
    • View Profile
Re: SQL Queries, Connectors, and 'Find in Diagram'
« Reply #8 on: May 20, 2025, 10:11:17 pm »
I wouldn't get too excited just yet. AS CLASSTABLE was introduced a couple of years ago, and I haven't seen much change yet in the treatment of connectors.

I'll put the party balloons back in the bag...
Phil

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: SQL Queries, Connectors, and 'Find in Diagram'
« Reply #9 on: May 20, 2025, 10:22:52 pm »
I wouldn't get too excited just yet. AS CLASSTABLE was introduced a couple of years ago, and I haven't seen much change yet in the treatment of connectors.

I'll put the party balloons back in the bag...
Such a sad image :'(

In dutch we have a saying feels applicable: "Iemand blij maken met een dooie mus", which translates to "To make someone happy with a dead sparrow"

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: SQL Queries, Connectors, and 'Find in Diagram'
« Reply #10 on: May 21, 2025, 08:39:40 am »
I wouldn't get too excited just yet. AS CLASSTABLE was introduced a couple of years ago, and I haven't seen much change yet in the treatment of connectors.

I'll put the party balloons back in the bag...
Such a sad image :'(

In dutch we have a saying feels applicable: "Iemand blij maken met een dooie mus", which translates to "To make someone happy with a dead sparrow"

Geert
Who said the Dutch were blunt?    ;)
(I know Geert is Flemish)

Paolo
« Last Edit: May 21, 2025, 08:46:37 am by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

PDC

  • EA User
  • **
  • Posts: 118
  • Karma: +5/-0
  • Systems Engineer
    • View Profile
Re: SQL Queries, Connectors, and 'Find in Diagram'
« Reply #11 on: May 21, 2025, 05:54:18 pm »
Such a sad image :'(
In dutch we have a saying feels applicable: "Iemand blij maken met een dooie mus", which translates to "To make someone happy with a dead sparrow"

That's absolutely brilliant! (and slightly monty python :D ) I'll definitely be using that from now on!
Phil