Book a Demo

Author Topic: Search for *connections* ... ?  (Read 28449 times)

matthew.james

  • EA User
  • **
  • Posts: 155
  • Karma: +8/-3
  • Am I supposed to say something here ... ?
    • View Profile
Search for *connections* ... ?
« on: June 25, 2018, 10:38:00 am »
I feel like I'm missing something, but is there any way in Sparx to search for Connections ? (*without* resorting to scripting or SQL queries)
The search options seem to cover a wide variety of Element attributes and a wide combination of strange element types, but nothing for connections (as far as I can see)

Specific use case - find all connections in project / package with stereotype of <whatever I choose>

I'm worried that this feature might be missing due to the quasi nature of connections (ie that they are part of the model but not actuallly in the model)

Thanks

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Search for *connections* ... ?
« Reply #1 on: June 25, 2018, 11:01:24 am »
Not sure what you refer to by 'SQL Queries' but you can define your own search  to find the connectors. you might have to use the sql query to find the right connections.
(AFAIK there isn't one out of the box)

One of the recent query i shared.. (replace Name with Stereotype for your need)
Code: [Select]
select c.Name as Name, ce.Name as ClientName,  ce.Object_Type as ClientType, se.Name as SupplierName, se.Object_Type as SupplierType   
from (( t_connector c
left join t_object ce on ce.Object_ID = c.End_Object_ID )
left join t_object se on se.Object_ID = c.Start_Object_ID )
where c.Name ='<Search Term>'

matthew.james

  • EA User
  • **
  • Posts: 155
  • Karma: +8/-3
  • Am I supposed to say something here ... ?
    • View Profile
Re: Search for *connections* ... ?
« Reply #2 on: June 25, 2018, 11:28:27 am »
Not sure what you refer to by 'SQL Queries'

LOL - I meant exactly what I said.  I wanted to search for connections without having to use SQL Queries like the one you sent me.

Seems to be a deficiency if the product doesn't allow people to search for something as core as a relationship in a model. SQL is fine but the result is just a list of text, it's not 'connected' to the tool, and many people using Sparx won't necessarily have SQL skills (plus the additional overhead of managing / sharing scripts around).

If there is nothing in the product to do this I will raise a feature request and see what Sparx have to say (just wanted to check first to make sure I hadn't missed anything obvious).

In the meantime, I do have SQL skills so I have used your script to get me past my current problem (thank you :-)

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Search for *connections* ... ?
« Reply #3 on: June 25, 2018, 11:44:52 am »
Just to clarify, i intended to mean, which way of using SQL queries ('cos there are zillion ways of using SQL queries in EA) as you were comparing this with Scripting (which is a tad more complex)

EA's Search functionality has been working with SQL queries for most use cases, however you can try requesting a predefined filter option for 'Connector' like we have for elements, attributes, etc.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Search for *connections* ... ?
« Reply #4 on: June 25, 2018, 01:14:59 pm »
Just to clarify, i intended to mean, which way of using SQL queries ('cos there are zillion ways of using SQL queries in EA) as you were comparing this with Scripting (which is a tad more complex)

EA's Search functionality has been working with SQL queries for most use cases, however you can try requesting a predefined filter option for 'Connector' like we have for elements, attributes, etc.

May be something like this.

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Search for *connections* ... ?
« Reply #5 on: June 25, 2018, 01:30:31 pm »
 :)

matthew.james

  • EA User
  • **
  • Posts: 155
  • Karma: +8/-3
  • Am I supposed to say something here ... ?
    • View Profile
Re: Search for *connections* ... ?
« Reply #6 on: June 25, 2018, 01:35:37 pm »
May be something like this.

We're both showing our age by recognising Clippy ... but then there is this

No - I'd settle for some pre-defined reports that support connections ...

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Search for *connections* ... ?
« Reply #7 on: June 25, 2018, 01:40:01 pm »
No - I'd settle for some pre-defined reports that support connections ...

Well you don't have to insert related elements but it's a quick way of seeing what connections exist.  Plus each element has a Related Links tab.

matthew.james

  • EA User
  • **
  • Posts: 155
  • Karma: +8/-3
  • Am I supposed to say something here ... ?
    • View Profile
Re: Search for *connections* ... ?
« Reply #8 on: June 25, 2018, 02:07:30 pm »
Well you don't have to insert related elements but it's a quick way of seeing what connections exist.  Plus each element has a Related Links tab.

Not sure what you're saying in that first sentence
I do know that you can see connections through the elements property tabs, but that presumes that you know where the connector might be and can find the relevant element(s)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Search for *connections* ... ?
« Reply #9 on: June 25, 2018, 03:27:42 pm »
Probably Paolo knows, but I don't. Relations usually ARE 2nd class citizens and the exist more or less anonymously between elements (and recently connectors). So what are your criteria to actually search for an connector?

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Search for *connections* ... ?
« Reply #10 on: June 25, 2018, 04:16:54 pm »
Seems to be a deficiency if the product doesn't allow people to search for something as core as a relationship in a model. SQL is fine but the result is just a list of text, it's not 'connected' to the tool, and many people using Sparx won't necessarily have SQL skills (plus the additional overhead of managing / sharing scripts around).

If you want your SQL search to be "connected" then you have to add the two (or three) magic fields to your resultset:

CLASSGUID, CLASSTYPE (and optionally CLASSTABLE)

In case of connectors, the annoying thing is that you can't select a connector in the project browser, nor can you do a "find in all diagrams" or something like that, so I usually add the guid of the source object in the search, making it at least possible to find the connector and do something with it.

Geert

matthew.james

  • EA User
  • **
  • Posts: 155
  • Karma: +8/-3
  • Am I supposed to say something here ... ?
    • View Profile
Re: Search for *connections* ... ?
« Reply #11 on: June 25, 2018, 04:18:59 pm »
So what are your criteria to actually search for an connector?

As per original post:
Specific use case - find all connections in project / package with stereotype of <whatever I choose>

Perhaps this is an edge case that not many people have a need for (although it is interestng that Nizam had a query already built to search for connectors, and I suspect many others will as well)
Perhaps it is just another scenario where I'm using Sparx as an Archimate modelling tool, when it doesn't really speak Archimate

matthew.james

  • EA User
  • **
  • Posts: 155
  • Karma: +8/-3
  • Am I supposed to say something here ... ?
    • View Profile
Re: Search for *connections* ... ?
« Reply #12 on: June 25, 2018, 04:21:14 pm »
If you want your SQL search to be "connected" then you have to add the two (or three) magic fields to your resultset:

Interesting - thanks Geert.

(clearly someone else who has found the need to search for connectors ...  :) )

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Search for *connections* ... ?
« Reply #13 on: June 25, 2018, 04:34:02 pm »
Well you don't have to insert related elements but it's a quick way of seeing what connections exist.  Plus each element has a Related Links tab.

Not sure what you're saying in that first sentence
I do know that you can see connections through the elements property tabs, but that presumes that you know where the connector might be and can find the relevant element(s)

I think GB is saying that you can open the Insert Related Elements dialog to see that information; you don't have to actually insert anything.
The Sparx Team
[email protected]

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Search for *connections* ... ?
« Reply #14 on: June 26, 2018, 08:39:38 am »
Perhaps it is just another scenario where I'm using Sparx as an Archimate modelling tool, when it doesn't really speak Archimate

Archi doesn't allow you to search for elements or connectors.  Nor does it have the ability to use a query language to supplement the canned searches.