Author Topic: Import issue: overwritten records  (Read 5044 times)

bITs.EA

  • EA User
  • **
  • Posts: 80
  • Karma: +2/-0
    • View Profile
Import issue: overwritten records
« on: March 16, 2016, 08:46:12 pm »
Hi

Yesterday, I tried to import an old repository (via import / export XML) into a new one. I imported the XML in a seperate "Archive" package, but nevertheless the import impacted lots of other packages:
- References to version control files changed to old references
- Package contents of packages which already existed in the old repo were overwritten with the old contents (so I lost content!!)
- Some packages are now a merge between old and new

1) Is there a way to 'revert' the repository to a state before my import?
2) Is there a way to appoint another version control XML to a package and import those contents?

Thanks for the help!

Grts

S

PeterHeintz

  • EA User
  • **
  • Posts: 965
  • Karma: +58/-18
    • View Profile
Re: Import issue: overwritten records
« Reply #1 on: March 16, 2016, 09:05:31 pm »
I have the feeling you should have clicked “strip GUID’s” before you started your import.
To question 1 and 2
If you have all your model content in a version control system you can revert all, by e.g simply create an empty eap-file and do an initial check-out from scratch.
Best regards,

Peter Heintz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13240
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import issue: overwritten records
« Reply #2 on: March 16, 2016, 09:15:44 pm »
Hi Stijn,

I hope you still have a backup (or have everything in version control).

The xmi imports in EA works in a not so obvious way. It uses the GUID's of elements and packages to check if an element or package already exists, and it will overwrite those model elements with the imported element.

If you check "strip GUID" checkbox then all elements will be imported as new. They will get a new GUID and EA will not overwrite or change anything from your existing model.

1) Only by restoring from your backup, or as Peter suggested restoring from version control
2) I'm not sure what you mean by that. Can you explain what you are trying to achieve?

Geert

bITs.EA

  • EA User
  • **
  • Posts: 80
  • Karma: +2/-0
    • View Profile
Re: Import issue: overwritten records
« Reply #3 on: March 16, 2016, 09:41:26 pm »
Thanks for the answers!

1) Everything is in Version Control. So how can I restore? Via new .eap file and do "get all latest"? Or is there another easier functionality in EA?

2) Geert, in my old repo the packages were linked with other version controlled xmi's than the same package in the new repo (IT restructured the Version Control structure). But after my import, the packages are searching for the old xmi's again... resulting in an error message telling me that the package is "not controlled". So I want to change the reference of the packages to the right xmi...

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13240
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import issue: overwritten records
« Reply #4 on: March 16, 2016, 09:53:29 pm »
1) I don't remember exactly as it has been a while, but there is something called a branch that allows you to import a whole model.
2) Should be possible with SQL. I think the version control file is stored in the t_package somewhere.

Geert


bITs.EA

  • EA User
  • **
  • Posts: 80
  • Karma: +2/-0
    • View Profile
Re: Import issue: overwritten records
« Reply #5 on: March 17, 2016, 02:16:13 am »
If someone else has this problem... The following has solved it for me:

1) Delete the 'infected' packages in the repository
2) Right click on a package/root model and select the xml of the root package of the 'infected' packages in via "get package..."
3) Right click on the imported package en perform "get all latest"

Now, EA imports all version controlled files which were originally under the root package.

This way, the problem with references to wrong xmi in version control is solved too!

I hope this can help others...

I will send a change request to Sparx too for asking to add a warning before overwriting!