Report all requirements without realization

134 views
Skip to first unread message

cpns

unread,
Dec 9, 2013, 6:00:00 AM12/9/13
to sparx-enterprise-archite...@googlegroups.com
I have a model with a large number of "Requirements" elements that are associated with modelling elements by "Realization" links.

I wish to generate a model search report for all requirements elements that have zero realization links.

Is this possible? And if so, how do I do it?

Thanks if you can help.

[original message]

Gary

unread,
Dec 9, 2013, 8:18:00 AM12/9/13
to sparx-enterprise-archite...@googlegroups.com
Yes it is possible to do by writing an add-in.
Check if the element is a requirement, then check number of connections. If there are connections check the stereotype of the connector and then for extra completeness, check the client.Type and supplier.Type of the connector to make sure the connector is the right way round.

[original message]

cpns

unread,
Dec 9, 2013, 8:49:00 AM12/9/13
to sparx-enterprise-archite...@googlegroups.com

5B1F5C58455A2E0 wrote:
Yes it is possible to do by writing an add-in.

OK, that is perhaps not as simple as I would have liked.  I was hoping for a canned SQL query to drop into the search builder.

I am an embedded systems developer, and would be a bit out of my comfort zone with add-in development for EA - I would not know where to start, so doing that is likely to take longer that I have at this time.

If I knew what I was doing, how long would it take do you think?  Do you have any pointers regarding where I would start - i.e. what tools or libraries do I need, what language can I use etc.

[original message]

cpns

unread,
Dec 9, 2013, 8:53:00 AM12/9/13
to sparx-enterprise-archite...@googlegroups.com

Quote:
i.e. what tools or libraries do I need, what language can I use etc.

To answer my own question on that I guess http://www.sparxsystems.com/resources/developers/autint.html is a good starting point?

[original message]

qwerty

unread,
Dec 9, 2013, 9:03:00 AM12/9/13
to sparx-enterprise-archite...@googlegroups.com
You can probably achieve that with a query. You need to join t_object.object_id with t.connector.start_object_id resp. end_object_id and check for a count of 0.

q.

[original message]

cpns

unread,
Dec 9, 2013, 10:35:00 AM12/9/13
to sparx-enterprise-archite...@googlegroups.com

54524057515C250 wrote:
You can probably achieve that with a query. You need to join t_object.object_id with t.connector.start_object_id resp. end_object_id and check for a count of 0.


Sounds good, but I am no SQL wizard either! �It's a lot to ask to be spoon fed a solution I know; �I perhaps naively thought it would be simple and someone would give me the magic runes. �:'(

In the meantime, I have discovered a solution that does not require a learning curve or development resource: �The information I need can be generated as a relationship matrix, but with thousands of requirements and hundreds of model elements that is unwieldy, but exporting it to Excel allows me to filter it to give just the information I need. �Not very slick, but usable.

[original message]

philchudley

unread,
Dec 9, 2013, 10:51:00 AM12/9/13
to sparx-enterprise-archite...@googlegroups.com
Alternatively, just use the built-in function in EA

Select in the Project Browser a View / Package containing the requirements
Select Project -> Model Validation -> Validate Selected from the Main Menu

The result is a list containing entries similar to that below

MVR7F0001 - warning (OLMS-NFR-010 - Language and OS Platforms (Requirement)): OLMS-NFR-010 - Language and OS Platforms is unrealized      

You can then select this list and output to a file or copy to the clipboard for pasting into your chosen reporting tool.

This method checks each requirement for a UML::Realization link from any element to the requirement, if none is found then the requirement is added to the list


Cheers

Phil

[original message]

cpns

unread,
Dec 9, 2013, 11:10:00 AM12/9/13
to sparx-enterprise-archite...@googlegroups.com

637B7A7F707B66777F766A130 wrote:
Select Project -> Model Validation -> Validate Selected from the Main Menu


Genius!  :)  That looks like just what I need.

Thanks.

[original message]

Dermot

unread,
Dec 9, 2013, 6:34:00 PM12/9/13
to sparx-enterprise-archite...@googlegroups.com
Validation is a good solution - to cover your initial query on the SQL search - try this:

SELECT �t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE, t_object.Name AS ElementName, t_package.Name AS PackageName, t_package.Package_ID, t_object.Object_ID
FROM t_package INNER JOIN t_object ON t_package.Package_ID = t_object.Package_ID
Where
t_object.Object_ID not in (Select �t_connector.Start_Object_ID FROM t_connector) �and
t_object.Object_ID not in (Select �t_connector.End_Object_ID FROM t_connector) and
t_object.Object_Type = "Requirement" �;

You can double-ckick on the results to get properties or right-click to fnd in diagrams etc.

[original message]

cpns

unread,
Dec 10, 2013, 5:40:00 AM12/10/13
to sparx-enterprise-archite...@googlegroups.com

1736213E3C27530 wrote:
Validation is a good solution - to cover your initial query on the SQL search - try this:


That works really well and is exactly what I was after, and is sortable within EA and as you say more navigable than the validation report. �It is much faster too.

Currently I am getting a large number of reports from validation that from the search, and have not yet determined why. �My plan is to resolve all the issues from the search (i.e. realise every requirement reported) then run the validation to see what the extra hits are.

Thanks.


[original message]

cpns

unread,
Dec 16, 2013, 12:42:00 PM12/16/13
to sparx-enterprise-archite...@googlegroups.com

3F2C322F5C0 wrote:
Currently I am getting a large number of reports from validation than from the search, and have not yet determined why.

The SQL search is reporting all Requirements with no link of any kind rather than specifically with no "Realization" link. �

So any thing with a note attached, or as a composition part of some other requirement are not reported - that covers a fairly large number of cases.

The SQL remains mostly voodoo to me!


[original message]

Dermot

unread,
Dec 17, 2013, 12:12:00 AM12/17/13
to sparx-enterprise-archite...@googlegroups.com
Try this:
SELECT  t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE, t_object.Name AS ElementName, t_package.Name AS PackageName, t_package.Package_ID, t_object.Object_ID
FROM t_package INNER JOIN t_object ON t_package.Package_ID = t_object.Package_ID
Where
t_object.Object_ID not in (Select  t_connector.Start_Object_ID FROM t_connector where  t_connector.connector_Type = "Realisation")   and
t_object.Object_ID not in (Select  t_connector.End_Object_ID FROM t_connector  where  t_connector.connector_Type = "Realisation") and
t_object.Object_Type = "Requirement"  ;

[original message]

cpns

unread,
Dec 16, 2013, 7:04:00 PM12/16/13
to sparx-enterprise-archite...@googlegroups.com
Thanks Dermot, from your suggestion my colleague (who was more willing than I to get to grips with SQL) came up with:


Code:
SELECT t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE, t_object.Name AS ElementName, t_package.Name AS PackageName, t_package.Package_ID, t_object.Object_ID
FROM t_package INNER JOIN t_object ON t_package.Package_ID = t_object.Package_ID
Where
t_object.Object_ID not in (Select  t_connector.End_Object_ID FROM t_connector  where  t_connector.connector_Type = "Realisation") and
t_object.Object_Type = "Requirement" ;


Which checks for realisation is one direction only ("Requirement is realised by..." relationship.

This now works better than the model validation for our purposes, since it finds occurrences of association rather than realisation, which the validation does not.  In most cases realisation is what I want, and an association is normally an incorrect connector type in this context.

Thanks to all how contributed to finding a solution.


[original message]

RoyC

unread,
Jan 14, 2014, 6:40:00 PM1/14/14
to sparx-enterprise-archite...@googlegroups.com

Quote:
Currently I am getting a large number of reports from validation that from the search, and have not yet determined why. �My plan is to resolve all the issues from the search (i.e. realise every requirement reported) then run the validation to see what the extra hits are.


Possibly you have too many options selected in Validation Configuration. I tested a small model and selected only the Requirements Management checkbox in the Model Validation Configuration dialog (Project > Model Validation > Configure). I then whacked in a few Notelinks and other non-realization connectors and still got a list of just "These ain't realized" messages.
[original message]
Reply all
Reply to author
Forward
0 new messages