archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
946 stars 269 forks source link

Drag and drop relations fails to recognize existing specialization #711

Closed Ridderby closed 2 years ago

Ridderby commented 3 years ago

Version of Archi

4.8.0

Archi Plug-ins

Collaboration, Excell, Scripting, Lightbox

Operating System

Linux/Manjaro up to date.

Expected Behaviour

I have two elements A and B. B has a specialization relation to A. When I drag B into A in a view, I expect B to be placed into A and the existing relation to be recognized. There shall be no question about what relation I intend to create.

Actual Behaviour

When I drag B into A I get a question of what kind of relation I would like to create and if I chose specialization, a second specialization relation is created. I have verified this on Business Process and Application Component.

Steps to Reproduce the Behaviour

  1. Create two Business Process elements A and B
  2. Create a Specialization Relation from B to A
  3. Drag B into A
  4. The dialog offers to create a relation
Phillipus commented 3 years ago

The Specialization relationship works the other way around.

Since Archi 4.8 the reversed relationships offered when nesting have been turned off in Preferences. If you tick Specialization in Preferences -> Connections -> ARM -> Reverse relations offered when creating new relations then when you drag B into A and select the reverse option it will work.

Ridderby commented 3 years ago

The automatically created relation is the same and with the same direction as the existing one, the same direction. I put B in A and let it create a specialization relation. I drag B out of A and B specializes A (the triangle-arrow-head points towards A).

You can also trigger this as follows;

If I check the "reverse" button I get the option to create either direction and following the steps above it seems to work properly what ever direction I chose. I can drop, create specialization relation either direction, drag out, drag back and it honors the existing relation whatever direction is has.

I did not have any revers relations enabled when I discovered this problem.

Phillipus commented 3 years ago

If I check the "reverse" button I get the option to create either direction and following the steps above it seems to work properly what ever direction I chose. I can drop, create specialization relation either direction, drag out, drag back and it honors the existing relation whatever direction is has.

Yes, you're right. So, the problem is as a result of not having the reverse relationships preferences set (these were turned off by default in Archi 4.8). Suggest to keep these ticked on in Preferences until the logic behind this is investigated more (CreateNestedArchimateConnectionsWithDialogCommand)

jbsarrodie commented 3 years ago

The Specialization relationship works the other way around.

It should work works as described by @Ridderby. Specialization works the opposite of other structural relationships (for specialization we nest the source inside the target).

I've just reproduce the issue and noticed that with default configuration 1) ARM is triggered, 2) if you dismiss ARM dialog (choose None), the already existing relationship is added anyway.

Now If I enable reverse specialization in preferences, then the ARM dialog is not triggered.

until the logic behind this is investigated more (CreateNestedArchimateConnectionsWithDialogCommand)

I'll try to have a look

Phillipus commented 2 years ago

Fixed in 4.9