Author Topic: References of "Composite Diagrams" and hierachies in the Project Browser  (Read 13366 times)

Viking

  • EA User
  • **
  • Posts: 453
  • Karma: +2/-2
    • View Profile
Hi, I cannot imagine that this has not been asked before, but I cannot find a corresponding thread.
(1) EA builds a hierarchy in the Project Browser by default if I move an element into another. But it does no reflect this via any kind of relation. For exampe the "reference" is not shown "Insert Releated Elements".
(2) The same is happens for "Composite Diagram" resp. "Child Diagram".
Is there a way to find out the relations (without database-queries)? Many thanks in advance, V.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
I guess you answered your own question: write a custom query. (Honestly, I didn't really get the gist of what you are looking for.)

q.

Viking

  • EA User
  • **
  • Posts: 453
  • Karma: +2/-2
    • View Profile
I guess you answered your own question: write a custom query. (Honestly, I didn't really get the gist of what you are looking for.)
q.

The question is, if there is a way to get the references (automatically added by EA and maybe hidden) listed in the "Insert Releated Elements" window.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
I see. No, that's not possible. "Related" just means "connected with any kind of connector". Might be worth a feature request to also include this kind of relation.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
I see. No, that's not possible. "Related" just means "connected with any kind of connector". Might be worth a feature request to also include this kind of relation.

q.
No, related means "having a relationship".  Whether expressed as a connector or by some other means.  If Sparx wanted to only show connected elements, they should have (/ still can) said so ("Show Connected Elements)".  If I specify a Classifier, then I am expressing an "instance of" relationship.  My Classifier is, therefore, a related element.  Indeed in our modelling environment, we often "materialize" some of these implicitly (in EA) defined relatinships - so that the two sets are congruent.

But in these post-truth, alternative facts, days - the meaning of words doesn't matter.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Viking

  • EA User
  • **
  • Posts: 453
  • Karma: +2/-2
    • View Profile
I see. No, that's not possible. "Related" just means "connected with any kind of connector". Might be worth a feature request to also include this kind of relation.
q.
No, related means "having a relationship".  Whether expressed as a connector or by some other means.  If Sparx wanted to only show connected elements, they should have (/ still can) said so ("Show Connected Elements)".  If I specify a Classifier, then I am expressing an "instance of" relationship.  My Classifier is, therefore, a related element.  Indeed in our modelling environment, we often "materialize" some of these implicitly (in EA) defined relatinships - so that the two sets are congruent.
But in these post-truth, alternative facts, days - the meaning of words doesn't matter.
Paolo
Hi Paolo, I am not sure if I understood you correctly. There is an (implicit) relation. So would add resp. model an (explicit) relation (e.g. is-part-of)? V.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
@Paolo: my sentence was incomplete. I meant "means in Sparxian terms" rather than "means" (in human terms).

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
I see. No, that's not possible. "Related" just means "connected with any kind of connector". Might be worth a feature request to also include this kind of relation.
q.
No, related means "having a relationship".  Whether expressed as a connector or by some other means.  If Sparx wanted to only show connected elements, they should have (/ still can) said so ("Show Connected Elements)".  If I specify a Classifier, then I am expressing an "instance of" relationship.  My Classifier is, therefore, a related element.  Indeed in our modelling environment, we often "materialize" some of these implicitly (in EA) defined relationships - so that the two sets are congruent.
But in these post-truth, alternative facts, days - the meaning of words doesn't matter.
Paolo
Hi Paolo, I am not sure if I understood you correctly. There is an (implicit) relation. So would add resp. model an (explicit) relation (e.g. is-part-of)? V.
As I indicated, the relationship just exists.  It is neither implicit nor explicit.  Sometimes it is represented as a connector between the two objects, and sometimes as a Feature of one or other object.  In the latter case, one can describe the feature as implicitly defining the relationship, but that is just an artifact of language.  Because EA doesn't render the Feature mechanism as an arc on a diagram (if both ends of the relationship are on it), we often create an additional (materializing) connector to duplicate the Feature mechanism and provide the visible rendering of the relationship on the diagram.

This allows true Diagrammatic reasoning - since all the relationships are rendered.

Does that help?

BTW: In this case, the relationship between the Instance and the Classifier is the (new) InstanceOf relaltionship (a stereotyped Abstraction relaltinship).  To be formally correct, we set the Scope of each end appropriately.  The shapescript uses this to ensure the relatinship is valid and will render in Error if not correct.

Paolo
« Last Edit: April 27, 2017, 05:34:26 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1324
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Hi, I cannot imagine that this has not been asked before, but I cannot find a corresponding thread.
(1) EA builds a hierarchy in the Project Browser by default if I move an element into another. But it does no reflect this via any kind of relation. For exampe the "reference" is not shown "Insert Releated Elements".

??? Kind of confused about what you are asking but you mention "hierarchy in the Project Browser" so I'm interpreting you are asking about the hierarchical relationships represented in the project browser. If you look in the t_object or t_diagram tables you'll find Package_ID and Parent_ID which are used to point to the  package and the parent.

(2) The same is happens for "Composite Diagram" resp. "Child Diagram".
Is there a way to find out the relations (without database-queries)? Many thanks in advance, V.

Other than looking at the project browser I can't think of any ways of finding out those hierarchy relationships unless using SQL. I've found books like SQL hacks, and recipes good for helping with SQL if thats your area of concern.

Hope that helps  :)
« Last Edit: April 27, 2017, 09:16:39 pm by Sunshine »
Happy to help
:)

Viking

  • EA User
  • **
  • Posts: 453
  • Karma: +2/-2
    • View Profile
@qwerty @Paolo @Sunshine, many thanks fo your answers.

If I understood you correctly the relationship (represented in teh database only) is more internal. Maybay it is correct to say the realtionship is "for represation purposes (in the diagram and in the project browser) only". Like the position of an element in a diagram, this relationship is used to store the position of an element in a hierarchy in a diagram and / or in the project browser.

In any case I need to add a relationship on my own. I cannot expect the users to use SQL.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1324
  • Karma: +121/-10
  • Its the results that count
    • View Profile
When the objects, packages or diagrams are created the parent relationship is created automatically and stored in parent_id in the relevant table. If you need to change where the object, package or diagram is located its simple to drag and drop to another location in the project explorer.  Users don't have to fiddle with SQL just drag and drop just like they do with windows file explorer. Kind of confused about what you are trying to do or what your problem is.  ???
May start at the beginning and state what you think the problem is and what you are trying to achieve.

Happy to help
:)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
He want's them to appear in the "Insert Related Elements" dialog. This is a valid request and I'd suggest to ask for a new feature.

q.

Viking

  • EA User
  • **
  • Posts: 453
  • Karma: +2/-2
    • View Profile
He want's them to appear in the "Insert Related Elements" dialog. This is a valid request and I'd suggest to ask for a new feature.
q.
Thank you for clarifying, qwerty.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
I have a gutt feeling though, that the change will be to rename the dialog "Insert Connected Elements" ;)

q.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1324
  • Karma: +121/-10
  • Its the results that count
    • View Profile
He want's them to appear in the "Insert Related Elements" dialog. This is a valid request and I'd suggest to ask for a new feature.

q.

Right. So a work around would be to create a Project browser JScript/VBScript that goes through the project tree and creates real composite relationships between the child and parent packages/objects.  Then you'd would see them in the insert related elements. You'd have to put a check in to make sure you don't duplicate the relationship when the script is run again later.
Simple aye?
Happy to help
:)