Author Topic: How do I hide relationships when nesting elements  (Read 5104 times)

Arnoud_B

  • EA User
  • **
  • Posts: 76
  • Karma: +0/-0
    • View Profile
How do I hide relationships when nesting elements
« on: February 17, 2022, 12:53:29 am »
I now have a working (very partial) ArchiMate implementation with nice looking elements and the correct relationships in my quick linker by using the "stereotyped relationship" in my profile definition.
However when I nest elements the relationships do not get hidden or at least not always.
If I have a composition between two (the same) elements and I nest them in the correct direction the relationship gets neatly hidden in the diagram. However I have created for instance a realization between my version of a service and an interaction and that does not get hidden when I nest the service in the interaction.
I searched the docs but I cannot find an attribute that influences this behaviour.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: How do I hide relationships when nesting elements
« Reply #1 on: February 17, 2022, 02:06:45 am »
EA does not do that for you. It's manual work (Hide relation). Probably you can write some script to aid you in doing that.

q.

Arnoud_B

  • EA User
  • **
  • Posts: 76
  • Karma: +0/-0
    • View Profile
Re: How do I hide relationships when nesting elements
« Reply #2 on: February 17, 2022, 03:51:29 am »
Querty, you are not correct SparxEA does that for you on numerous occasions only my MDG does not reproduce that behaviour so I have to set an attribute somewhere I think. Only then the $10.000 question which attribute. I did not find any thing in the documentation that pointed in the correct direction.
I made some screen shots of what happens:
https://imgur.com/a/OcwuYiQ

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: How do I hide relationships when nesting elements
« Reply #3 on: February 17, 2022, 04:41:41 am »
Maybe then it's some newer feature. In the past (I don't come over this too often) it never hid any relations on nesting.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8063
  • Karma: +118/-20
    • View Profile
Re: How do I hide relationships when nesting elements
« Reply #4 on: February 17, 2022, 08:41:42 am »
In short, this is something that the ArchiMate specification specifies, and we have implemented it for ArchiMate. It's not currently possible to implement the same behavior for your own language.

Having said that, it conceptually kind of works for aggregation/composition connectors but it can be ambiguous about what connector is present in this circumstance makes it generally a bad idea.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8597
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How do I hide relationships when nesting elements
« Reply #5 on: February 17, 2022, 10:00:10 am »
Arnoud,
Search the forum for "Visually embed".  You actually are not nesting, but visually embedding.  We created some automation to manage this, but (as usual) there are some Sparxian "gotchas" involved.

HTH,
Paolo
« Last Edit: February 19, 2022, 03:48:00 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!

Arnoud_B

  • EA User
  • **
  • Posts: 76
  • Karma: +0/-0
    • View Profile
Re: How do I hide relationships when nesting elements
« Reply #6 on: February 19, 2022, 07:52:51 am »
Quote
Having said that, it conceptually kind of works for aggregation/composition connectors but it can be ambiguous about what connector is present in this circumstance makes it generally a bad idea.
Well we can debate if ArchiMate syntax is logical or not on other fora I think. I just implement the specification is it is written down by the OpenGroup.

Arnoud_B

  • EA User
  • **
  • Posts: 76
  • Karma: +0/-0
    • View Profile
Re: How do I hide relationships when nesting elements
« Reply #7 on: February 19, 2022, 08:01:17 am »
Quote
You actually are not nesting, but visually embedding.  We created some automation to manage this, but (as usual) there are some SParxian "gotchas" involved.
Thanks for putting me on the right track, embedding is the term used in the ArchiMate spec but that indeed does not mean SparxEA uses a similar terminology. I'll have a search an a try. Your last part of the sentence does not make me happy though  :-\

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8063
  • Karma: +118/-20
    • View Profile
Re: How do I hide relationships when nesting elements
« Reply #8 on: February 21, 2022, 10:40:30 am »
Quote
You actually are not nesting, but visually embedding.  We created some automation to manage this, but (as usual) there are some SParxian "gotchas" involved.
Thanks for putting me on the right track, embedding is the term used in the ArchiMate spec but that indeed does not mean SparxEA uses a similar terminology.
Pretty sure that Sparx Systems has always used the term nesting in Enterprise Architect. The difference in terminology here is Paolo using a different term from the commonly understood in an attempt to be unambiguous.

I just implement the specification is it is written down by the OpenGroup.
Why? Assuming you could eventually implement something equivalent to the implementation that already exists in EA. The only thing you'll achieve is that you would not be able to share models without sharing your technology. Even then, linking between the standard implementation and yours is going to be problematic.

Arnoud_B

  • EA User
  • **
  • Posts: 76
  • Karma: +0/-0
    • View Profile
Re: How do I hide relationships when nesting elements
« Reply #9 on: February 23, 2022, 01:45:50 am »
Hi Eve,

Quote
Why? Assuming you could eventually implement something equivalent to the implementation that already exists in EA.
It is ABSOLUTELY NOT my goal to re-invent the wheel and if I could support my modelling requirements without extending ArchiMate3 MDG or by extending it (and not re-implementing it) that would certainly be my preference. However SparxEA does not seem to enable you to really overwrite stereotypes you can only extend them. So if I think there is too much possible in a stereotype (my main example is that the quick picker shows relationships that are not in the spec and are actually derived relationships at best) I cannot remove these things I can only add more on top.
So I would definitely want to inherit the hiding behaviour during nesting of the ArchiMate3 MDG however if I generalize an ArchiMate3 stereotype I get all stuff I do not want. If you know a way around that I would be VERY HAPPY to understand how.
Quote
The only thing you'll achieve is that you would not be able to share models without sharing your technology. Even then, linking between the standard implementation and yours is going to be problematic.
Yes that is a major discussion now with my colleagues; do we stay standard and except limited useability on how much we can help our users to model correctly and how much we can auto validate with scripting. Or do we go custom and create a maintenance problem in the future as somebody has to maintain the MDG assure it followes future ArchiMate releases etc.
The whole reason we model in SparxEA and NOT in visio is because it is supported by a model which you can validate to detect modelling errors and from which you can auto generate views showing ALL related entities keeping views up to date with out a major resource impact. For now I am not able to create human readable things and clear errors without adding context to the ArchiMate model by specializing.
Again for me at the moment it is choosing between a rock and a hard place. But I am used to that as Architect  ;D

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1086
  • Karma: +28/-8
    • View Profile
Re: How do I hide relationships when nesting elements
« Reply #10 on: February 23, 2022, 02:45:31 am »
[SNIP]
The difference in terminology here is Paolo using a different term from the commonly understood in an attempt to be unambiguous.
The difference in terminology and the implications of how Sparx Systems has chosen to implement it need to be fully understood.

In UML nesting is a relationship between 2 elements without physically nesting them - i.e., without making the element on the target end of the relationship a child of of the element in the source end of the relationship, without representing them hierarchically. The nesting relationships could be visually represented as relationships or as a map of visually embedded elements. The same could apply to other relationships such as generalization/specialization, aggregation/composition. This is, of course, not the way Sparx Systems has chosen to implement nesting.

Instead Sparx Systems has done something very Sparxian. When you attempt to nest anything in Sparx it creates a physical relationship between the elements, it creates a physical hierarchy - i.e., it makes one element the physical parent of the other - and does not create a relationship between the nested elements. The UML nesting relationship is a bit of afterthought, the same way that visually nesting generalizations/specialisations or aggregations/compositions.

Ideally, I Sparx should create out of the box nesting relationships between packages, generalization/specialization relationships between visually nested classes (or any passive structure element) and aggregations/compositions between components, all of it without physically nesting them, and allow displaying them as hierarchy (physical nesting) or as visual nesting.

I agree with Arnoud we are between a rock and hard place.
« Last Edit: February 23, 2022, 02:47:45 am by Modesto Vega »

Arnoud_B

  • EA User
  • **
  • Posts: 76
  • Karma: +0/-0
    • View Profile
Re: How do I hide relationships when nesting elements
« Reply #11 on: February 23, 2022, 03:21:46 am »
Well I try to keep the three axis aligned with scripting;
- Based on a structural ArchiMate relationship scripts in our repository will or move the element to the correct parent (in the repo browser setting the parent relationship or SparxEA) or alert with validation scripts where the parent is not the same as the expected element based on the found relationships. This way I try to keep the hierarchy in the repository the same as the ArchiMate relationships visible in the diagram.
Diagram scripts will auto nest or un-nest elements that are partially overlapping and are the child or parent of each other. Again to make what people think the see is modeled and and what is actually in the model the same.
Without validations on the repository and the diagrams you can easily create diagrams that suggest something completely different compared what is actually in the repository.
For that reason I am sub-typing ArchiMate stereotypes as we use the same ArchiMate stereotypes in different context and they are only allowed to use a different subset of the ArchiMate specification in that context. So we are 100% compliant to the ArchiMate spec but sometimes a bit more strict.