Book a Demo

Author Topic: XMI Contect of Version-Controlled Package  (Read 7392 times)

Tehila1

  • EA User
  • **
  • Posts: 256
  • Karma: +0/-0
    • View Profile
XMI Contect of Version-Controlled Package
« on: July 27, 2014, 07:22:22 pm »
I would like to delete the connection between a version-controlled package elements, and the diagrams where these elements are exist as diagram objects.

Where this connection is performed in the associated XMI file of the package?

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: XMI Contect of Version-Controlled Package
« Reply #1 on: July 27, 2014, 07:58:26 pm »
Hi,

if you delete an element all the appearances are deleted too. This is independent if this is version controlled package or not.

The connection between the element and the diagram object is part of either the element package or the diagram package. This depends on the direction of the relationship.

If you use version control and you share a common repository among users the diagram objects are immediately deleted after deleting the element.

If you use private repositories the deletion is only propagated to the other repositories in case you import the element owning package. If you are using placeholders  in *.xml for deleted elements the usage in diagrams get an "External Reference" and if later the deleted element came back the missing reference will be updated.
The EA command "..reconcile.." searches for lost references and tries to reconcile them. Often the command Get All Latest updates the private repository to the newest release. I admit there is sometimes  behaviors I can't really understand.

Keep in mind understanding version control with private repositories is powerful but often not easy to understand. In the forum there are a lot of good threads of the pros and cons.

Helmut

Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Tehila1

  • EA User
  • **
  • Posts: 256
  • Karma: +0/-0
    • View Profile
Re: XMI Contect of Version-Controlled Package
« Reply #2 on: July 27, 2014, 08:12:56 pm »
Quote
Hi,

if you delete an element all the appearances are deleted too. This is independent if this is version controlled package or not.

The connection between the element and the diagram object is part of either the element package or the diagram package. This depends on the direction of the relationship.

If you use version control and you share a common repository among users the diagram objects are immediately deleted after deleting the element.

Helmut

Thanks for the detailed reply.

Somethimes when one user delete an element from the model, the rest of users of the version-controlled model get the following message:  

"Missing Cross References:
Latest revision of this controlled package contains the following cross package references, which are missing from the XMI file you're currently exporting. Select the items you wish to restore to the XMI." Then I have 2 checkboxes to check: connectors and diagram contents.
  
Deleting the connection on the XMI will probably solve the problem, Wouldn't it? how should I do it?
Thanks.
« Last Edit: July 27, 2014, 08:20:20 pm by avoda234 »

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: XMI Contect of Version-Controlled Package
« Reply #3 on: July 27, 2014, 08:26:31 pm »
Hi,

if you deliberately delete a package no link or reference makes any sense.

Do you use shared or private repositories?
Do you use placeholders in *.xml for deleted elements?

The easiest thing is:
- Get All Latest for private repositories
  (it should reconcile all references)
- Simply delete the unnecessary diagram object.

Always be aware: Sometimes peculiar things happen using version control.

Possibly, one person know your special problem.

Helmut

Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Tehila1

  • EA User
  • **
  • Posts: 256
  • Karma: +0/-0
    • View Profile
Re: XMI Contect of Version-Controlled Package
« Reply #4 on: July 29, 2014, 09:22:25 pm »
I would like to clarify the situation:

There is a package with a diagram.
On the diagram there are 2 classes: class A and class B, with a relation.

I checkout the package, then, delete class B with the relation from the diagram, and check-in.

EA apprehensive that this deletion can affect other version-controlled packages that are not checked-out. Therefore, Class B and the relation are deleted from the model, but still stored in the appropriate XMI file.

Then, when someone  tries to checkout this package again, EA finds differences between the model (the class and relation were deleted) and the XMI (the diagram object and relation were not deleted), and asks whether to restore them .

I would like to avoid this message, therefore, would like to delete the data from the XMI itself.

How is this data saved in the XMI?


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: XMI Contect of Version-Controlled Package
« Reply #5 on: July 29, 2014, 09:52:56 pm »
Another point that suggests not to use version control (for single packages). Each exported packages has knowledge of relations which are external. So they hold one end of the tie. And when someone tries to connect it the system detects that something strange might have happened outside. Usually the person doing the check-in/out is not aware of what has happened outside the scope of the package. Using such a technology is simply dangerous.

Everywhere I convinced a customer to drop package based VC in favor of repository based VC they over night got rid of a ton of problems. Working with the model got more fluent (time for ci/co is simply eliminated), dead locks due to co packages are gone, the "get all latest" issue does not appear and the issue you encounter is also gone.

q.
« Last Edit: July 29, 2014, 09:53:17 pm by qwerty »

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: XMI Contect of Version-Controlled Package
« Reply #6 on: July 29, 2014, 11:00:23 pm »
Hi,

q makes a good point. These are also my experiences.

If you haven't important reasons to use VC better don't use it.

Beside all good arguments of q just think how to analyze and merge different  releases. In principle it works. But it isn't as easy as you know it from source code.

In this forum you find a lot about this theme.

Helmut

Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

ken.norcross

  • EA User
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: XMI Contect of Version-Controlled Package
« Reply #7 on: August 12, 2014, 01:39:27 am »
Quote
...

Everywhere I convinced a customer to drop package based VC in favor of repository based VC ...

q.

Could you describe what you mean by repository based VC?

We are having issues with diagram contents disappearing and right now we do not understand why. I suspect it has to do with diagrams in one VC package and the elements in another VC package, but we are not sure yet.

What do you mean by repository based VC?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: XMI Contect of Version-Controlled Package
« Reply #8 on: August 12, 2014, 03:51:51 am »
Simply you export the whole repository to XML and put that under VC. This can easily be done by a short script being run on a nightly basis. I also added checks for reference data so they'll be put under VC too.

Now about your vanishing diagram elements: this happens if your sequence diagrams reference classes instead of instances. This is a general problem which you will also encounter when trying to restore a complete repository. You have to (this is also somewhere in the help) use instances. Unfortunately EA does not complain about classes being used in SDs. Really bad as you only notice your fault when you use a) VC and find it at the next checkout or b) at the next backup restore from XML. Actually classes are not correct in SD as they describe behavior which is only to be found with instances.

q.
« Last Edit: August 12, 2014, 03:55:44 am by qwerty »

ken.norcross

  • EA User
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: XMI Contect of Version-Controlled Package
« Reply #9 on: August 12, 2014, 04:33:50 am »
These are BPMN diagrams.

Package A has BPMN Activity elements and BPMN diagrams.

Package B has alternate BPMN diagrams that re-use the elements from Package A. (I realize this is not the best choice but it is the choice we made)

We keep losing the contents of the diagrams in Package B for elements that live in Package A. The elements and relationships all still exist, you just have to drop the elements on the diagram again, but they disappear from the diagram in Package B.


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: XMI Contect of Version-Controlled Package
« Reply #10 on: August 12, 2014, 05:01:03 am »
I see. I suspected also some possible trouble with cross-referring elements. EA sometimes asks you what to do with some missing links and if you answer the wrong way you get shot in your own knee. Can't recall the actual circumstances but remember that it had been discussed here.

q.