archimatetool / archi-portico-plugin

Archi plugin to import/merge a reference model into another model
6 stars 2 forks source link

Summary dialog and detailed log #6

Open jbsarrodie opened 4 years ago

jbsarrodie commented 4 years ago

Edge case 1

  • Model B as already been imported into A
  • Some relationship's ends has been changed
  • Let's assume these relationships were used in a view "V" coming from B, but remove since
  • We merge again B into A with "update" option not set
  • "V" should be restored (because this is a merge and "V" no more exist), but "V" contains a relationhip whose ends have changed, so this relationiship can no more exist in "V"
  • So in fact we can't restore "V"

What do we do? Either we abort the whole merge operation because we can't merge/restore "V" exactly as it was in B, or we raise a warning?

From my tests, as of now, running this tests end up with the view being imported and the relationship ends moved back to their original elements (ie. relationship has been updated while update mode is off). I can confirm that relationship is not updated if no views from B contain it (expected behavior).

My thoughts:

Edge case 2

  • Model B as already been imported into A
  • Some relationship's ends has been changed
  • Let's assume these relationships were used in a view "V" which does not come from B (ie. created after the first merge)
  • We merge again B into A with "update" option set
  • Because "update" option is set, the relationship is restored to its original ends.
  • "V" is impacted because now the relationship is no more valid in the context of the view

What do we do? Warning?

Tested, and of course, "V" is impacted as expected.

My thoughts:

In addition:

Originally posted by @jbsarrodie in https://github.com/archimatetool/archi-portico-plugin/issues/1#issuecomment-567519881

jbsarrodie commented 4 years ago

Copying comment from @Phillipus from https://github.com/archimatetool/archi-portico-plugin/issues/2#issuecomment-565859209

But perhaps what might be useful after the import is a "WTF just happened?" status report. So we could throw up a dialog something like:

Import successful
No changes
Import successful
12 Elements added, 5 updated
1 Folder updated
2 Views added, 1 updated
2 Connections deleted, 1 re-connected

And maybe go into more detail with names of concepts, folders, views.

I don't know if one would want more detail than that?

Phillipus commented 4 years ago

The status dialog and status framework is in place now. Just need to agree the messages to display.

staus dialog