Author Topic: BUG: Importing of packages from XMI files broken  (Read 7434 times)

Mahaveer Pareek

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
BUG: Importing of packages from XMI files broken
« on: October 10, 2006, 07:14:44 pm »
Two packages A and B were created and exported to XMI files where package A had dependency on package B.
The same XMI files were imported in a new project to reconstruct the original project. XMI file for package A was imported first and then XMI file for package B. The parts of the diagrams for package A dependent on package B were missing.

But if the XMI file for package B was imported first and then XMI file for package A, the reconstruction was OK.

The problem gets worse when both packages have circular dependencies. In this case the project cannot be reconstructed from the XMI files at all even though all required objects were imported albeit in different order.

The order of import should not matter as long as all required referenced objects are available.

This is a bug.  

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #1 on: October 10, 2006, 09:10:09 pm »
Actually, I don't think it's a bug.

During the import of each package where the required model information isn't available, then anything requiring that can't be created.  (Examples being an object on a diagram or a connector)  It also can't really be stored in hope that the required model information will be created later.

A subsequent import of any package that didn't have all the information available at the last import will add in the new information while keeping any incoming references current.
« Last Edit: October 10, 2006, 09:11:36 pm by simonm »

Mahaveer Pareek

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #2 on: October 10, 2006, 11:30:20 pm »
I do not agree.

At the end of the import process, a message displayed is "Import complete!" on "Import Package from XMI dialog box".

This is in spite of throwing away a part of the information in the import process without letting the user know.


darren.sampson

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #3 on: October 11, 2006, 12:08:17 am »
I'm in agreement with Mahaveer - this is a bug.

We use the XMI as our version-controlled "original" for each component.

If we have a package A in an XMI, and a package B in a second XMI and B references an element in A...

If I import A then B into an EAP file, then I have a complete model.

If I import just B into a new EAP (which deletes the reference to the element in A), update an unrelated diagram (as an example) then re-export the XMI, the XMI now no longer has the reference to the element in A. At a later date repeat the process in the paragraph above, I have lost information - the link from B to A.

What Simon is saying is that I have to import both XMI to make any change. In this simple example, that would be OK.  When I've got hundreds of components with complex relationships, this is not realistic.  Even trying to work out what order I should import all the XMIs is near impossible.  If I want to automate this, it's completely impractical.

In fact, cyclic references make it impossible to successfully import anything!

Please fix this - you should never throw away data even if you're not sure what to do with it.
See the new Jobs Section on:EA Wiki...

darren.sampson

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #4 on: October 11, 2006, 12:48:35 am »
Thinking more about it, it seems that the following is true:

There is no way to reliably re-create an EAP with multiple project roots with references between elements within the project roots...
at least without knowing a dependency graph of the whole EAP file and analysing it to find an import order.  

If there are cyclic dependencies, then it is impossible.

This is true because you cannot export a single XMI for the whole EAP file.

This means the EAP is (in reality) irreplaceable and not reproducible from XMI.
See the new Jobs Section on:EA Wiki...

Gary_Barnes

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #5 on: October 11, 2006, 01:28:01 am »
This is going to be a show stopper for my company.
The model that we are currently building up will have over 200 components in it and each of these is intended to be in it's own XMI file. As we are documenting a previous design we do not have the luxury of stating that there are to be no circular references and I am almost certain that some will exist.
Even if we do manage to detect and remove all circular dependencies and create a list of the order that components needed to be loaded in there is still a significant likelyhood that someone will accidently not load a component that is needed, and there is apparently no warning that this has happened, and we will then loose information when they save their portion of the model.

It seems to me that this is the same problem that exists with Rational Rose when using .cat files. However Rose used to just display a generic object with an 'M' in a circle in one corner to indicate that the detailed information was missing.

Could a similar thing be done by EA?

Gary
Give a hard job to a lazy man,
He will find an easy way to do it.

Mahaveer Pareek

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #6 on: October 11, 2006, 08:50:51 pm »
It has been confirmed to be a bug and Sparx will have it fixed in the future releases.

I agree with Gary that this bug is a show stopper and hope that this will be fixed quickly.

I thank Sparx for prompt action.

darren.sampson

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #7 on: October 31, 2006, 12:16:41 am »
I'm very interested in keeping track of this bug fix...

Sparxians:  How is this fix progressing?  When can we expect to see the fix in a build?

Thanks!
See the new Jobs Section on:EA Wiki...

lubos

  • EA User
  • **
  • Posts: 101
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #8 on: October 31, 2006, 01:41:00 am »
As I have tried this feature in version 6.5.799 I suppose it was already fixed. I have tested it and if I have not loaded some referenced packages, their elements are not visible on any diagram, but as soon as I loaded them, they appeared.
I want to ask if you plan to enhance this feature in similar way as it works in Rose for example. It means, even when the package is not loaded some fragments are still visible on diagrams indicating that something is missing...



darren.sampson

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #9 on: October 31, 2006, 02:37:47 am »
I can confirm it is not fixed in 799 - I tried it today while I was looking at the "dirty flag" for controlled packages (in another thread).

It depends on the order you load the packages - some orders work, others don't.
See the new Jobs Section on:EA Wiki...

Gary_Barnes

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #10 on: October 31, 2006, 06:25:36 pm »
I have spent a number of days attempting to work out what the load order should be for our 79 xml files in order to avoid getting errors.
The following items appear to cause EA to report an error:
- Loading a diagram which has an element displayed on it which is stored in a controlled package that has not been loaded.
- Loading an element that has Generalisation, Dependency or StateFlow where the supplier is in a controlled package that has not been loaded.

If anyone can add to this list it would be appreciated.

Gary
Give a hard job to a lazy man,
He will find an easy way to do it.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #11 on: October 31, 2006, 07:07:50 pm »
There is no need to work out any load order.  As I said in my previous post.

Quote
A subsequent import of any package that didn't have all the information available at the last import will add in the new information while keeping any incoming references current.

Import everything, in any order you like.

Then select Project | Import/Export | Batch XMI Import.  Select everything and run the import.  All links will be present in the model.

However, if you still want the list:
  • A diagram showing an element that doesn't exist in the model yet.
  • A connector other than an aggregation where the supplier doesn't exist in the model yet.
  • An aggregation where the client doesn't exist in the model yet.

In each of these situations information is intentionally discarded because there isn't enough information available to construct it.  The solution is to import it again after the information is available.

darren.sampson

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #12 on: October 31, 2006, 07:10:37 pm »
Hi Simon,

Quote
The solution is to import it again after the information is available.


That's not really a solution - it's a workaround.  

What you're actually saying is that you should always load everything twice to ensure there is no data loss.  Manually checking every diagram is not a realistic option.

It also means if someone else makes changes to a number of controlled packages in their own private EAP file, the only way you can be certain you have everything is to re-load all the changed packages in your own EAP twice.

Please fix this!

Darren
« Last Edit: October 31, 2006, 07:16:53 pm by darren.sampson »
See the new Jobs Section on:EA Wiki...

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: BUG: Importing of packages from XMI files brok
« Reply #13 on: November 01, 2006, 10:31:39 pm »
Quote
There is no need to work out any load order.  As I said in my previous post.

Import everything, in any order you like.

Then select Project | Import/Export | Batch XMI Import.  Select everything and run the import.  All links will be present in the model..


We (currently) have 80 packages to import (and this will grow over time).  There is NO Select All/None facility on the Batch XMI Import dialog.  The Save Settings button - doesn't appear to...

If you can't fix the basic bug, can you look at fixing these UI failings?

Remember, As per your advice we have to do this twice each time!

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