Book a Demo

Author Topic: Search Sequence Diagrams  (Read 3646 times)

dbetsing

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Search Sequence Diagrams
« on: January 29, 2011, 02:04:51 am »
I'm new to EA and am attempting to find a way to search for all sequence diagrams where a method is used.  Can anyone tell me if there is a way to do that?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13455
  • Karma: +571/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Search Sequence Diagrams
« Reply #1 on: January 31, 2011, 07:53:32 pm »
Try this one:
Code: [Select]
select distinct d.ea_guid as CLASSGUID,d.Diagram_Type as CLASSTYPE,d.name as Name  ,package.name as 'Package Name'
,package_p1.name as 'Package level -1',package_p2.name as 'Package level -2',package_p3.name as 'Package level -3'
from (((((t_connector c
inner join t_diagram d on c.diagramID = d.diagram_id)
inner join t_package package on d.package_id = package.package_id)
left join t_package package_p1 on package_p1.package_id = package.parent_id)
left join t_package package_p2 on package_p2.package_id = package_p1.parent_id)
left join t_package package_p3 on package_p3.package_id = package_p2.parent_id)
where c.name like '#WC#<Search Term>#WC#(#WC#)'
and d.Diagram_Type = 'Sequence'

Geert

dbetsing

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Search Sequence Diagrams
« Reply #2 on: February 09, 2011, 09:06:57 am »
Quote
Try this one:
Code: [Select]
select distinct d.ea_guid as CLASSGUID,d.Diagram_Type as CLASSTYPE,d.name as Name  ,package.name as 'Package Name'
,package_p1.name as 'Package level -1',package_p2.name as 'Package level -2',package_p3.name as 'Package level -3'
from (((((t_connector c
inner join t_diagram d on c.diagramID = d.diagram_id)
inner join t_package package on d.package_id = package.package_id)
left join t_package package_p1 on package_p1.package_id = package.parent_id)
left join t_package package_p2 on package_p2.package_id = package_p1.parent_id)
left join t_package package_p3 on package_p3.package_id = package_p2.parent_id)
where c.name like '#WC#<Search Term>#WC#(#WC#)'
and d.Diagram_Type = 'Sequence'

Geert

Thanks for the post.  I apologize for not getting back earlier, but when I copied and pasted the above into the sql search, it didn't work. (I got the column headings but couldn't get any results).  My assumption is that I am not using EA correctly or I don't recall enough sql to use the above correctly, so I wanted to investigate further before coming back and just haven't gotten time yet.  

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13455
  • Karma: +571/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Search Sequence Diagrams
« Reply #3 on: February 09, 2011, 06:29:23 pm »
This search works based on the name of the messages in sequence diagrams, assuming that the always have both parentheses "(" and ")".

So to find a sequence diagram that contains a message with the name
"getAllMembers(Category)" you should type in "getAllMembers" in the search box (or "getAllM") or something like that.
Can you confirm that your messages on sequence diagrams contain the parentheses?

If you are looking for a solution to nagivate directly from operations to sequence diagrams and vice-versa you can use the free EA Navigator Addin I published on the community site.

Geert

dbetsing

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Search Sequence Diagrams
« Reply #4 on: February 12, 2011, 05:06:25 am »
Thanks alot.  That helped immensely.  As expected, the problem was not understanding how to build an SQL search.  Whatever I did before was wrong.  Going through the help, I entered the SQL correctly and your script worked excellent.   Thanks Again!!!