Book a Demo

Author Topic: Import from XMI into an existing model  (Read 7313 times)

ducatiross

  • EA User
  • **
  • Posts: 114
  • Karma: +1/-0
    • View Profile
Import from XMI into an existing model
« on: November 22, 2014, 02:02:55 am »
I worked from home yesterday, so the previous day I did a Package Export from my SQL Server EA model at work into an XMI file. Then at home, I loaded the XMI file into a new .eap project on my laptop’s version of Enterprise Architect. I built a load of new diagrams using the components from the XMI and added new elements to existing swimlanes etc.
 
Now I am back at work and want to import my new diagrams and elements into my work’s SQL Server EA repository. But it seems I cannot integrate my new items into the existing packages and elements – I can only create a new package for the new items, which then don’t share any of the common objects with the existing project. (e.g. swimlanes, containing activities, events, data objects, messages etc).

Is there a way to do this, integrating new elements into existing owners (e.g. like new activities into existing swimlanes) maintaining existing diagrams, objects and relationships ?

Guillaume has kindly suggested Baseline Comparisson Tool, so I'll look at this, but any other suggestions would be gratefully received. I really hope I don't have to re-do the work all over again  :-[!

thanks

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import from XMI into an existing model
« Reply #1 on: November 22, 2014, 02:20:57 am »
Depends. You need to have checked out everything else. Then you can import your work with no issue. Eventually you need to move elements from your ex-/import package to where they were before.

q.

ducatiross

  • EA User
  • **
  • Posts: 114
  • Karma: +1/-0
    • View Profile
Re: Import from XMI into an existing model
« Reply #2 on: November 22, 2014, 03:04:42 am »
Hi q.

Not sure I understand your reply exactly.

I did not check out anything before I exported the source package from the original model to the XMI file.

Do I do that now, in the original model at the root package level before I try the Project/Import from XMI ?

I don't understand the steps., so would appreciate an 'Idiot's Guide' !

I am trying the Baseline Comparison now, but it seems very long-winded and only partially successful, so a better alternative would be welcome. Very !

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import from XMI into an existing model
« Reply #3 on: November 22, 2014, 04:56:00 am »
I don't know your configuration but seem to remember that you have either VC or controlled packages. If you have VC then you need to check out any related package (the easiest is you co all of them). Only then you can import your work once again.

q.

ducatiross

  • EA User
  • **
  • Posts: 114
  • Karma: +1/-0
    • View Profile
Re: Import from XMI into an existing model
« Reply #4 on: November 24, 2014, 03:07:30 am »
I haven't enabled version control yet on the project, so I will try to do this retrospectively and see if I can then import my changes.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import from XMI into an existing model
« Reply #5 on: November 24, 2014, 04:36:30 am »
You don't need to. If you have a plain model without locking or VC you should be able to import your work just as it is.

q.

ducatiross

  • EA User
  • **
  • Posts: 114
  • Karma: +1/-0
    • View Profile
Re: Import from XMI into an existing model
« Reply #6 on: November 25, 2014, 12:46:51 am »
The basic import into my existing model only let me import the new elements if I created them all with new GUIDs. I didn't want to do this as I wanted to merge the new elements in with the existing ones.

After a fair bit of trial and error though, following Guillaume's suggestion, I got the Baseline Compare/Merge process to work and now I have my original model intact with the addition of new elements, and diagrams that use a combination of the original and new elements.  :)

So I am very happy, but will look into this in more detail so I understand exactly how I've managed it so I can do it again if I need to.

thanks all.

Matthew

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import from XMI into an existing model
« Reply #7 on: November 25, 2014, 03:32:38 am »
Matthew, if you import with Strip GUIDs you will create a set of new elements. This includes also the ones you exported before. So the links to the old elements are lost on import since you get copies of the existing elements. Next time do NOT use that option. It then will add new elements and replace existing elements with the changes you made. Try this: export a package via XMI. Import it into another (empty) EAP. Add an element and delete another one. Now export the package once again and import (again without Strip!) it into the original model. You will see that the changes in the package are reflected exactly as you did.

q.

ducatiross

  • EA User
  • **
  • Posts: 114
  • Karma: +1/-0
    • View Profile
Re: Import from XMI into an existing model
« Reply #8 on: November 28, 2014, 11:39:41 pm »
Yes, you are right q.

I tested this before I worked from home and it worked fine.

But when I tried to import my changes to my model at work, EA complained that I already had a root node (of the package I was trying to import to) and would not let me import.

I've just tried the process again on a simple model and again, it all worked easily without needing to do the Baseline Compare/Merge process.  :-/

I will now try it on my complex model and see what happens....

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import from XMI into an existing model
« Reply #9 on: November 29, 2014, 12:18:07 am »
There are always traps you might fall in. If you deal with root nodes EA will ask you where to place the import on top level again. This is confusing. You should try to import such a root export with being a root again and also to settle below a root (i.e. export a root, import it as being a root again vs. begin a child/view and the bring it back to the original repository.)

q.

ducatiross

  • EA User
  • **
  • Posts: 114
  • Karma: +1/-0
    • View Profile
Re: Import from XMI into an existing model
« Reply #10 on: November 29, 2014, 12:28:14 am »
... well, the export and re-import worked fine on my complex model  ::)

I haven't got a clue what I did wrong before, but I am happy it all works now.

The only difference is that I've got a different edition of EA on my home laptop whereas the works one uses Corporate. I wonder if that has an impact ?

I'm working from home again next week, so we'll see if I hit the same problems !

Matthew

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import from XMI into an existing model
« Reply #11 on: November 29, 2014, 04:14:27 am »
In 99% of all cases there should not be any problem with different versions. EA is very conservative in changes to the model (which is good and bad). But you never know whether you hit the 1% :-/

q.