Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: DanG83616 on May 27, 2008, 10:30:20 am

Title: Model search involving connectors
Post by: DanG83616 on May 27, 2008, 10:30:20 am
I've linked a whole bunch of requirements to an artifact. I would like to use model search to list those requirements. Is there a simple way to do it? I fiddled with the SQL search but didn't know what I was doing. Perhaps there is a reference someone could recommend.

Thanks, DanG
Title: Re: Model search involving connectors
Post by: Eve on May 27, 2008, 10:48:57 am
If you've linked them with a realization connector the easiest way to list them is in the require tab of the element properties dialog.  (See http://www.sparxsystems.com.au/EAUserGuide/index.html?responsibilities.htm and http://www.sparxsystems.com.au/EAUserGuide/index.html?externalresponsibilities.htm).

Other than that I suspect you would need to use the SQL search or an add-in search.
Title: Re: Model search involving connectors
Post by: KP on May 27, 2008, 11:01:42 am
Quote
I fiddled with the SQL search but didn't know what I was doing.
To get a better handle on what you're doing, try these two searches:
Code: [Select]
SELECT * FROM t_object
Code: [Select]
SELECT * FROM t_connectorThese will show you the entire contents of the object and connector tables, complete with the names of all the fields in each table. Looking at the results you should be able to decide what fields you want to extract and what fields you want to filter on, and you might end up with something like this:
Code: [Select]
SELECT ArtifactTable.Name AS ArtifactName, RequirementTable.Name AS RequirementName
FROM t_object AS ArtifactTable, t_object AS RequirementTable, t_connector
WHERE t_connector.Start_Object_ID = ArtifactTable.Object_ID
AND t_connector.End_Object_ID = RequirementTable.Object_ID
AND t_connector.Connector_Type = 'Dependency'
This says: "Select {list of fields} from {list of tables} where {list of conditions}" and most SQL searches are pretty much similar to that...
Title: Re: Model search involving connectors
Post by: DanG83616 on May 28, 2008, 06:21:14 am
KP, that was the tip I needed. Thank you much, Dang