Book a Demo

Author Topic: How to reimport the same package?  (Read 11628 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to reimport the same package?
« Reply #15 on: April 19, 2010, 04:32:14 pm »
Eric,

My experience is that Sparx support is really helpful when faced with a user problem, so it is worth a shot.

As to doing the synchronise yourself, I wouldn't go through the database but rather use the API.

I've written an little program myself a while ago to fix a similar issue.

We had several EA models that had a shared part with common datatypes and stuff. For some reason something went wrong with the manual export/import of this common model and we ended up with elements that had different GUID's in different models.

Then we decided to merge the different models into one bug model (e.g. database).
To solve the issue with the different GUID's I merged the xmi's from the different versions of our common model.
The result was that some classes appeared twice, but with a different GUID.
Then I wrote a program in C# to loop all elements in my duplicates package, find the corresponding element in my "real" package, and replace all occurences of the duplicate element with the "real" element.
Things to look for are:
- usage of element as type of attribute
- usage of element as type of parameter
- usage of element as returntype of operation
- usage of element on diagrams
- usage of element in relations.

For most usages it was enough to replace the duplicate elementID with the real elementID. Only DiagramObjects were a bit difficult since I had to recreate the diagramObject iso just being able to replace the elementID.

Regards

Geert

beginner

  • Guest
Re: How to reimport the same package?
« Reply #16 on: April 20, 2010, 04:24:02 am »
Right and wrong, Geert. In contrast to other companies which are doing absolutely nothing and thus not runnig in the problem of doing the wrong thing, Sparx are doing quite a lot. But unfortunately often the wrong thing. Reasons for that have been discussed in broad. I have uncounted open bug reports compared to a few realized enhancements. I better like to see correction of bugs rather than another source of  bugs in form of a new feature. The situation is getting worse. Some years ago it was nice to see a lot of enhancements coming fast. Now it's time for a redesign of EA coming fast. Or at least a (more) bug free system.

b.