Author Topic: Links between VC packages getting lost  (Read 668 times)

Dave.B

  • EA User
  • **
  • Posts: 94
  • Karma: +0/-0
    • View Profile
Links between VC packages getting lost
« on: October 09, 2009, 11:41:37 pm »
I'm working a project that is using EA across three distributed sites. For performance reasons each site has its own MySQL database back-end with ClearCase used to both version control and distribute (with replication) the packages between the three sites.

The problem is that we are suffering from lost links between elements in separate packages. The problem seems to be that if a package is updated in version control by one site that the EA databases used by the other two sites are not automatically updated. So if a link is made between an existing element in package A and a new element in package B and both are checked in by site 1. Then one of the other sites, say site 2, happens to check out package A (which will load the latest version of it into their model) and make a change to it and check it back in, without doing a get latest on package B beforehand. Then we seem to find that EA has dropped the link between the elements in package A and B that were previously put in by site 1.

Our guess is that when EA loads an XMI that has a linkage to an element that is not in its model that it discards it. Moreover, when EA checks-in a package, the package's XMI is completely regenerated from the current model. Hence the link(s) that were dropped are now missing from the exported XMI.

If this guess about EA's behaviour is correct then it would imply that the order of applying a get latest on out of synch packages becomes critical, and may even require two passes to ensure that a model database is correctly populated. This also implies that the problem would exist when populating a new EA project from a set of interconnected packages. Isn't this unworkable!

One answer might be to minimise the relationships between packages. But that sounds a bit limiting too.

Another one might be to apply a proper change management process so that the remote sites receive an official notification of a changed package.

It might be possible to automate the package re-synch if we can write a ClearCase event trigger script and get it to run when a package is updated by a replication event. (Not looked into that yet.)

I've done some searching through the forum achieves and found some discussion back in late 2006 (circa EA build 804). So it seems to be a long standing issue. See here:
http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.pl?board=general;action=display;num=1162193553
http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.pl?board=general;action=display;num=1163383934
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1167792327/2#11

I've also checked with the latest copy of the EA Deployment white paper (http://www.sparxsystems.com/downloads/whitepapers/EA_Deployment.pdf - version 1.2 2009) and that seems to be mute on the difficulties that can arise from using Version Control systems to distribute packages to separate databases.

What is the best practise for running an EA project across multiple sites when a single database back-end cannot be used?

Thanks
Dave B.

PS currently using EA v7.5.846
« Last Edit: October 16, 2009, 02:11:07 am by Dave.B »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7740
  • Karma: +165/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Links between VC packages getting lost
« Reply #1 on: October 10, 2009, 12:05:53 am »
Dave,

You can add http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1255075022  to the list.
The fact that EA fails to correctly position the relations in the xmi files if probably one of the root causes of this behaviour.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5880
  • Karma: +71/-77
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Links between VC packages getting lost
« Reply #2 on: October 10, 2009, 12:14:39 am »
Hi Dave,

The way XMI Export works for EA you have to make sure that both sides of all relationships are made available at the destination.

Thus if you want to export package B and it has links to Packages A & C then you have to export AB & C then reimport them all twice.

Because on import, an element is replace via it's GUID regardless of which package it's in; back in 2007, we (Darren Sampson and I)experimented with some technology that assembled the linked elements into a special sub-package below the exported one and "put them back where they  came from" at the remote end.  It was reasonably successful, but would not work for internal version control.

You should find some postings (from about the times you found) that suggest that Sparx should implement anaemic stubs for the linked elements (similar to how Rational Rose did this sort of thing).

I can't see how you can solve the problem for repository management by XMI without such constructs.

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

Dave.B

  • EA User
  • **
  • Posts: 94
  • Karma: +0/-0
    • View Profile
Re: Links between VC packages getting lost
« Reply #3 on: October 13, 2009, 06:48:57 pm »
Hmmm.... this seems to be a bit of show stopper! It sounds like the only work around is a whole load of process to manage the hand-over of checked in packages between the development sites.  :(

I would also suggest that the EA Deployment White paper is updated to make this caveat very clear.

Dave B.