Author Topic: Removed elements re-appear in version controlled diagrams  (Read 801 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8025
  • Karma: +183/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Removed elements re-appear in version controlled diagrams
« on: January 06, 2018, 01:36:40 am »
I have the following situation
Package A
  - Class A
Package B
 Diagram B -> contains Class A

Both Package A and Package B are version controlled separately and checked in separately
Now I
- check out Package B
- remove Class A from my Diagram B
- save Diagram B
- check in Package B

Then I get a dialog saying that there are possibly missing cross references with an entry saying Diagram Contents with a count of 1 By default the checkbox is checked.
Since I have no means to figure out which diagram contents EA is talking about, the safe thing seems to be to accept the default setting and click OK.

Nothing weird happens, so I'm happy... that is until (might be months later) I do a checkout of Package B
Suddenly I notice that class A is back on my diagram B, although I removed it previously.
I think that is a clear bug.
I can imagine having safeguards for situation where I would be editing package B in a model that doesn't contain Package A, but in this case it the diagram object is part of Package B, so whether or not it is deleted has nothing to do with external references.

Geert

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6273
  • Karma: +52/-5
    • View Profile
Re: Removed elements re-appear in version controlled diagrams
« Reply #1 on: January 08, 2018, 08:38:40 am »
I can imagine having safeguards for situation where I would be editing package B in a model that doesn't contain Package A, but in this case it the diagram object is part of Package B, so whether or not it is deleted has nothing to do with external references.
But that's exactly what it is. ClassA is a reference to an element external to the package that is being checked in.
Simon

support@sparxsystems.com

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6033
  • Karma: +73/-83
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Removed elements re-appear in version controlled diagrams
« Reply #2 on: January 08, 2018, 10:59:04 am »
I can imagine having safeguards for situation where I would be editing package B in a model that doesn't contain Package A, but in this case it the diagram object is part of Package B, so whether or not it is deleted has nothing to do with external references.
But that's exactly what it is. ClassA is a reference to an element external to the package that is being checked in.
Have to agree with Simon here...  (No raucous cheering please, Sparxians!   ;D)

It's a conceptual problem with version controlling repositories; hence why we gave that away years ago.  Repositories ONLY "roll-forward", if you make an error, you need to rectify it by either rolling back the entire repository or merging the last good portion (from a snapshot) with the current bad potion to rectify it.  The decision (as to which option to use in a given situation) is a cost-benefit.

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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8025
  • Karma: +183/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Removed elements re-appear in version controlled diagrams
« Reply #3 on: January 08, 2018, 04:01:42 pm »
I can imagine having safeguards for situation where I would be editing package B in a model that doesn't contain Package A, but in this case it the diagram object is part of Package B, so whether or not it is deleted has nothing to do with external references.
But that's exactly what it is. ClassA is a reference to an element external to the package that is being checked in.
No it isn't. It's a diagram object owned by the package B that is being deleted and then comes back only because it references an element that is not owned by package B?
That is just ridiculous, even more so since the ClassA actually still exists in the model, so it should be easy enough to check for that.
The current situation is a bug that will corrupt the model, often weeks or months after someone allows the external references to be added to the xmi file.

There should be at least an option to prevent this type of behavior.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 9202
  • Karma: +140/-131
  • I'm no guru at all
    • View Profile
Re: Removed elements re-appear in version controlled diagrams
« Reply #4 on: January 08, 2018, 05:41:45 pm »
You should understand what Paolo said. You're living a wrong life here. Version control is fine for code text, but not for UML models.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8025
  • Karma: +183/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Removed elements re-appear in version controlled diagrams
« Reply #5 on: January 08, 2018, 05:50:37 pm »
You should understand what Paolo said. You're living a wrong life here. Version control is fine for code text, but not for UML models.

q.

Yes and No.
I use version control only in the case that I have different repositories sharing the same part of a model.
We only go forward, never go back, and we never (try to) merge.
In these circumstances using version control is perfectly possible.
This is just a bug. If the users always uncheck all the checkboxes in the dialog there is never a a problem.
For this particular client I'm not even interested in fixed the bug. Some kind of option to never restore external references would be find for me.
There is an option in the version control setting with regards to external references, but that does not have the effect I thought it would have. The dialog still appeared despite turning off the setting.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6033
  • Karma: +73/-83
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Removed elements re-appear in version controlled diagrams
« Reply #6 on: January 08, 2018, 06:57:00 pm »
You should understand what Paolo said. You're living a wrong life here. Version control is fine for code text, but not for UML models.

q.

Yes and No.
I use version control only in the case that I have different repositories sharing the same part of a model.
We only go forward, never go back, and we never (try to) merge.
In these circumstances using version control is perfectly possible.
This is just a bug. If the users always uncheck all the checkboxes in the dialog there is never a a problem.
For this particular client I'm not even interested in fixed the bug. Some kind of option to never restore external references would be find for me.
There is an option in the version control setting with regards to external references, but that does not have the effect I thought it would have. The dialog still appeared despite turning off the setting.

Geert
Having agreed with Simon, under this scenario, I also agree with Geert!  (Nothing like having "two bob each way"!)

Sounds like a reasonable request.

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

qwerty

  • EA Guru
  • *****
  • Posts: 9202
  • Karma: +140/-131
  • I'm no guru at all
    • View Profile
Re: Removed elements re-appear in version controlled diagrams
« Reply #7 on: January 08, 2018, 08:23:27 pm »
D'accord

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8025
  • Karma: +183/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Removed elements re-appear in version controlled diagrams
« Reply #8 on: January 13, 2018, 01:48:27 am »
Apparently the option exists already. It was just hidden very well ;)

From Sparx support:
Quote
Please refer to the "Report Deletion of Cross Package References" help topic:
http://www.sparxsystems.com/enterprise_architect_user_guide/13.5/model_publishing/report_deletion_of_cross_packa.html

As mentioned...

Note that if all users are connecting directly to the same repository then detection of missing cross references should not be necessary, and you can disable the feature by deselecting the 'Report Cross Package Reference Deletions (XMI 1.1)' checkbox.

This option can be accessed via 'Start > Workspace > Preferences > XML Specifications > Report Cross Package Reference Deletions (XMI 1.1)'.

Problem solved

Geert