Book a Demo

Author Topic: Report all requirements without realization  (Read 8881 times)

cpns

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Report all requirements without realization
« on: December 09, 2013, 10:00:06 pm »
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.

Gary

  • EA User
  • **
  • Posts: 84
  • Karma: +1/-0
    • View Profile
Re: Report all requirements without realization
« Reply #1 on: December 10, 2013, 12:18:20 am »
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.

cpns

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Report all requirements without realization
« Reply #2 on: December 10, 2013, 12:49:40 am »
Quote
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.

cpns

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Report all requirements without realization
« Reply #3 on: December 10, 2013, 12:53:05 am »
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?
« Last Edit: December 10, 2013, 12:54:07 am by cpns »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Report all requirements without realization
« Reply #4 on: December 10, 2013, 01:03:19 am »
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.

cpns

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Report all requirements without realization
« Reply #5 on: December 10, 2013, 02:35:59 am »
Quote
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.
« Last Edit: December 10, 2013, 02:37:57 am by cpns »

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Report all requirements without realization
« Reply #6 on: December 10, 2013, 02:51:49 am »
Alternatively, just use the built-in function in EA

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

The result is a list containing entries similar to that below

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

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
Models are great!
Correct models are even greater!

cpns

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Report all requirements without realization
« Reply #7 on: December 10, 2013, 03:10:10 am »
Quote
Select [highlight]Project -> Model Validation -> Validate Selected[/highlight] from the Main Menu

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

Even better, you can double-click on an entry on the list and it takes you straight to the diagram.

Thanks.
« Last Edit: December 10, 2013, 03:31:48 am by cpns »

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Report all requirements without realization
« Reply #8 on: December 10, 2013, 10:34:31 am »
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.
« Last Edit: December 10, 2013, 10:35:03 am by Dermot »

cpns

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Report all requirements without realization
« Reply #9 on: December 10, 2013, 09:40:25 pm »
Quote
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.

« Last Edit: December 10, 2013, 09:41:50 pm by cpns »

cpns

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Report all requirements without realization
« Reply #10 on: December 17, 2013, 04:42:00 am »
Quote
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!

« Last Edit: December 17, 2013, 04:42:55 am by cpns »

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Report all requirements without realization
« Reply #11 on: December 17, 2013, 04:12:14 pm »
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"  ;

cpns

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Report all requirements without realization
« Reply #12 on: December 17, 2013, 11:04:38 pm »
Thanks Dermot, from your suggestion my colleague (who was more willing than I to get to grips with SQL) came up with:

Code: [Select]
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.


RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Report all requirements without realization
« Reply #13 on: January 15, 2014, 10:40:37 am »
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.
Best Regards, Roy