Book a Demo

Author Topic: Releationship between two packages under src ctrl  (Read 5120 times)

kwosch

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Releationship between two packages under src ctrl
« on: March 03, 2010, 02:05:55 am »
Hi!

We have several packages under source control within ClearCase. We know that if you create a relationship between two packages, for example a use relationship, the link will be saved in both packages at the relevant elements.
But what happens if, for example, the target package is not checked out? EA could not save the link at the target element! On the other side, if both packages are checked out while you create a link, the relationship is saved in both packages. But if you delete the link if, for example, only one of these packages is checked out, the link will stay in the other still checked in package. Unfortunately EA restores the link if you execute a "Get All Latest". So the model will get inconsistent.

Is that behaviour a bug or a feature? ;-) Is it possible to configure EA so that releationships only will be saved in the source package?

Greetings!
« Last Edit: March 03, 2010, 02:08:31 am by kwosch »

Dave.B

  • EA User
  • **
  • Posts: 94
  • Karma: +0/-0
    • View Profile
Re: Releationship between two packages under src c
« Reply #1 on: March 06, 2010, 01:32:45 am »
This is a world of pain! I haven't decided whether to blame Sparks Systems or the OMG for their XMI specification.

The critical place for a link to be restored is the source element. However, if you load a package XMI that has references to target elements that are not in the model then the link's reference to the target element is dropped and the link is effectively deleted. This means that if subsequently the target element is loaded the link will be not be restored (and that is despite the fact that the target element has the link's reference to the source object).

We have found that performing two passes of get-latest on the packages can help. The first ensures that all the elements are loaded into the database and the second ensures that the links are restored.

hope this helps,
Dave B.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Releationship between two packages under src c
« Reply #2 on: March 06, 2010, 01:54:34 am »
Well, it shouldn't be a problem.
There is a very clear ownership definition of every type of relation in UML.
If EA sticks to that, and only saves the relation in the owning package then there should never be an issue.

I suggest you report this officially (use the link on the bottom of the page) as a (critical) bug so it can hopefully be fixed ASAP.

Geert

Dave.B

  • EA User
  • **
  • Posts: 94
  • Karma: +0/-0
    • View Profile
Re: Releationship between two packages under src c
« Reply #3 on: March 27, 2010, 12:53:59 am »
Quote
Well, it shouldn't be a problem.
There is a very clear ownership definition of every type of relation in UML.
If EA sticks to that, and only saves the relation in the owning package then there should never be an issue.
The problem is what EA does when it loads an XMI that has references to elements that are not in its database. Currently it drops the references! This means that if the next thing you do is to load an XMI that has the target elements in then the link between the elements in the two XMI packages will not be restored (despite the redundant link information).

EA really needs to cache references to elements that are missing so that if and when they get loaded it can match up all the links.

Regards
Dave B.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Relationship between two packages under src c
« Reply #4 on: March 27, 2010, 09:13:57 pm »
Quote
Quote
Well, it shouldn't be a problem.
There is a very clear ownership definition of every type of relation in UML.
If EA sticks to that, and only saves the relation in the owning package then there should never be an issue.
The problem is what EA does when it loads an XMI that has references to elements that are not in its database. Currently it drops the references! This means that if the next thing you do is to load an XMI that has the target elements in then the link between the elements in the two XMI packages will not be restored (despite the redundant link information).

EA really needs to cache references to elements that are missing so that if and when they get loaded it can match up all the links.

Regards
Dave B.
Yes, we've asked many times for EA to create anemic elements which can be replaced by real ones later when imported, but to no avail.

In the meantime you need to import the packages at both ends (at least) twice each to make sure you don't "drop" anything between the slats...

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

dschmid2

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: Releationship between two packages under src c
« Reply #5 on: March 30, 2010, 05:51:52 pm »
Wow, why didn't I come earlier to this forum. We are struggeling with this issues for quite some time now and finally I see that there are plenty of people out there that face the same.

There is also another fear I have. If later in time we want to get back to an earlier version of our project by retrieving older revisions of different packages, it's very probably going to be a real pain to get a model that is complete with no relations removed!

This thread is also directly related to
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1268858646
Using EA 9.1.909 on Win7, C++ Code Generation

dschmid2

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: Relationship between two packages under src c
« Reply #6 on: March 30, 2010, 05:57:19 pm »
Quote
Yes, we've asked many times for EA to create anemic elements which can be replaced by real ones later when imported, but to no avail.

I used to work with Rational Rose in my former company. If a relation to a class could not be resolved, there was a visual indicator (M) on the class, there was also a warning at package load time, and there was also a warning when code was generated.
It was very obvious that there was need to update or add the missing package.

To EA: please add this functionality, you have all information available that you need, just notify us and DO NOT DELETE ANYTHING you shouldn't ! >:(
Using EA 9.1.909 on Win7, C++ Code Generation