Book a Demo

Author Topic: Auto creation of a relationship for visually embedded elements  (Read 2956 times)

peterc

  • Guest
Auto creation of a relationship for visually embedded elements
« on: February 13, 2020, 08:45:01 pm »
Is it possible to define in an MDG that when one element is embedded visually (i.e. placed on top of another element in rectangle notation) that a defined relationship is automatically added?

I don't want this, but if I place an element on top of another element in the same package then EA automatically nests it (in the project browser under the element on which it is dropped) and in the Traceability window it gets an "owned by" relationship.

If I place an element from another package on top of my element, then there is no relationship created. However they are visually related on screen and when the "bottom" element is moved, the element(s)  that it contains move with it. What I would like is to define that when this is done, an Aggregation relationship is automatically created. Both elements are my own custom stereotypes so I would define that when Stereotype A is dropped onto Stereotype B that they A is Aggregated to B.

If I manually create an Aggregation relationship (either by dropping A onto the diagram and creating the link then moving onto B), then the relationship visually "disappears" when one element is on top of another, but this involves the user in another step (which they also need to remember to do).

I'm not quite sure whether this is implemented with the "metaconstraint" connector?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Auto creation of a relationship for visually embedded elements
« Reply #1 on: February 13, 2020, 09:38:11 pm »
I think you would need an add-in to do something like that.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Auto creation of a relationship for visually embedded elements
« Reply #2 on: February 13, 2020, 09:39:00 pm »
Hi Peter,

We created some automation to do this.   You need to have a set of visually embedded items on a diagram first. It asks what relationship metatype you want to create and then processes the set of objects to determine the level of embedding on that particular diagram and then creates the linkages. It's not rocket science but it's not trivial.

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