Author Topic: Package browser not showing all information  (Read 5996 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8623
  • Karma: +211/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Package browser not showing all information
« Reply #30 on: November 29, 2012, 11:52:02 pm »
Quote
as I said previously, we shouldn't query the database directly.
I'm not sure about that when talking about SQL Searches.
These searches are an official and documented feature of EA.

So presumably if Sparx would ever change their database structure, they should be able to provide some kind of conversion tool or backwards compatibility layer for the SQL Searches.

That argument doesn't apply when talking about say Crystal Reports directly querying he database, or usage of queries in add-ins.

Geert

Kamal Hammoutene

  • EA User
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: Package browser not showing all information
« Reply #31 on: November 30, 2012, 12:41:39 am »
Quote
Quote
as I said previously, we shouldn't query the database directly.
I'm not sure about that when talking about SQL Searches.
These searches are an official and documented feature of EA.
Unfortunatly Geert, there is no official documentation of the database schema.
For example, how did you manage to know which tables and attributes in the tables were relevant to your great SQL query?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8623
  • Karma: +211/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Package browser not showing all information
« Reply #32 on: November 30, 2012, 01:26:56 am »
True, there's little to no documentation of the db schema.

I learned the structure by trial and error, but then again, most of it is rather trivial.

Geert

Kamal Hammoutene

  • EA User
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: Package browser not showing all information
« Reply #33 on: December 15, 2012, 05:54:11 am »
Quote
Quote
As Geert said, the Package Browser is intended to show the elements contained in a package. Not everything that is referenced by a package. If it was intended to show the references then it would. It's just meant for a different use case from what you're trying to use it for. That doesn't make it wrong or misleading.

....

Sorry to come back again to this discussion.

Let's take a concrete example:

I have created a model with actors, use cases and requirements. The requirements are linked to the use cases.
My model is organised by Use Cases. A requirement is written in a "User Story" style: "As a 'actor name', I want to be able to .....".
When I use the package browser, I can see everything.

Now, I wanted to provide a different view on the requirements which is organised by actors. So I have created a package by actor and within each package, a requirement diagram where I dragged and dropped the requirements which are relevant to the current actor.

I then open a package browser on this package, and the result is NOTHING.

I still believe that the Package Browser should list the elements referenced in the diagram even if it was not "the intented use of the package browser".
Actually, the problem is worse as if you document such a packahe with a RTF template, you cannot access/document referenced in the diagram.

Sparx, please give you point of view.

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Package browser not showing all information
« Reply #34 on: December 15, 2012, 07:00:38 am »
Quote
Sparx, please give you point of view.
As others already mentioned, may be you should clarify such requirements as official feature request or bug report to Sparx' support (support@sparxsystems.com).
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

Kamal Hammoutene

  • EA User
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: Package browser not showing all information
« Reply #35 on: December 15, 2012, 08:27:20 pm »
Quote
Quote
Sparx, please give you point of view.
As others already mentioned, may be you should clarify such requirements as official feature request or bug report to Sparx' support (support@sparxsystems.com).
Done over a month ago.
What I would like is that many users are pushing for it too. As I said in a previous post, I cannot imagine that the implementation would be complex.

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6497
  • Karma: +57/-6
    • View Profile
Re: Package browser not showing all information
« Reply #36 on: December 17, 2012, 09:05:28 am »
Three different representatives of Sparx contributed to this topic and I believe your email query has been responded to as well.

Allow me to re-iterate.

This is not a bug. The Package Browser is working for what it was designed to do, which does not include displaying related elements.
You have been provided with multiple ways to get a report similar to what you wanted to display.

You are free to request this as a feature, but please remember that for various reasons not all features will be implemented.
« Last Edit: December 17, 2012, 09:05:53 am by simonm »
Simon

support@sparxsystems.com

Stefan Bolleininger

  • EA User
  • **
  • Posts: 309
  • Karma: +0/-0
    • View Profile
Re: Package browser not showing all information
« Reply #37 on: December 17, 2012, 06:11:23 pm »
Dear Kamal,

about a year ago i have written an add-in which some queries for showing impacted elements and maybe there is such a implementation which you are needing.

If you send me an email, i will send this add-in to you. Maybe it helps you, maybe not.
Enterprise Architect in "safetycritical development" like medical device industry. My free Add-in at my Website

Kamal Hammoutene

  • EA User
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: Package browser not showing all information
« Reply #38 on: January 17, 2013, 09:44:27 pm »
Quote
Try this:
Code: [Select]
select distinct o.ea_guid as CLASSGUID,o.Object_Type as CLASSTYPE,o.Name as Name,d.name as DiagramName ,package.name as PackageName ,package_p1.name as PackageLevel1,package_p2.name as PackageLevel2 ,package_p3.name as PackageLevel3
from ((((((t_diagram d
inner join t_diagramobjects do on do.Diagram_ID = d.Diagram_ID)
inner join t_object o on o.Object_ID = do.Object_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
o.Object_Type = 'Requirement'
and package.Package_ID in (#Branch#)
and o.Name like '#WC#<Search Term>#WC#'

Geert

Hi Geert,

This nice SQL query is not working anymore (it used to work).
I got an error message "Invalid column name #Branch#"

How #Branch# is defined?

Thanks a lot for your help.

qwerty

  • EA Guru
  • *****
  • Posts: 9836
  • Karma: +190/-155
  • I'm no guru at all
    • View Profile
Re: Package browser not showing all information
« Reply #39 on: January 17, 2013, 10:39:30 pm »
#branch# is only defined in the internal find Search Builder. It does not work a simple SQL executed from Respository.Execute or the query builder SQL pane.

tjamaker

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Package browser not showing all information
« Reply #40 on: July 13, 2016, 05:11:59 pm »
Can you please tell me what the (#Branch#) does in your Query. It seems to be useful for me, but I have each element matching the query six times in my results.
...
and package.Package_ID in (#Branch#)
...

Additionally here is my query:
Code: [Select]
select
c.ea_guid as CLASSGUID,
c.object_type as CLASSTYPE,
c.name as Name,
c.stereotype as Stereotype,
package.name as PackageName,
package_p1.name as PackageLevel1,
package_p2.name as PackageLevel2,
package_p3.name as PackageLevel3,
c.package_id AS Package
from (((((t_object c
inner join t_objectproperties op on op.Object_ID = c.Object_ID)
inner join t_package as package on c.package_id = package.package_id)
left join t_package as package_p1 on package_p1.package_id = package.parent_id)
left join t_package as package_p2 on package_p2.package_id = package_p1.parent_id)
left join t_package as package_p3 on package_p3.package_id = package_p2.parent_id)
where c.package_id in (#Branch#)
and c.stereotype = 'requirement'
and op.Property <> 'Target_Release'
« Last Edit: July 13, 2016, 07:29:51 pm by tjamaker »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8623
  • Karma: +211/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Package browser not showing all information
« Reply #41 on: July 13, 2016, 05:20:14 pm »
You have it multiple times because you join with t_objectproperties, and I guess you have 6 tagged values with a name different from 'Target Release'

Seems a bit weird to do this since you don't use anything from the tagged values in your result.
If the join is there simply to filter the results then you better use a exists clause then a join.

#Branch# is a macro that is being replaced by a comma separated list of package ID of the currently selected package and it's sub-packages.

Geert
« Last Edit: July 13, 2016, 05:22:02 pm by Geert Bellekens »