Book a Demo

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

Ericga

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
How to reimport the same package?
« on: April 16, 2010, 12:53:32 am »
Hello,

I simply need to refresh all classes I previously imported though an XMI file. I have an updated XMI to import but I am getting duplicates instead of just the update I am looking for. I can delete the old ones but I will lose all diagrams.

What is the simplest way to do this?

thanks

Eric

Nizam Mohamed

  • EA User
  • **
  • Posts: 193
  • Karma: +1/-0
    • View Profile
Re: How to reimport the same package?
« Reply #1 on: April 16, 2010, 09:17:31 am »
Re importing the same XMI over the same package(by selecting the package before import) should update the model with the latest from XMI.

You might as well do a compare with XMI (if you have XMI 1.1), and merge from baseline to the model.

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: How to reimport the same package?
« Reply #2 on: April 16, 2010, 09:25:32 am »
Also ensure that you don't have the option "Strip GUIDS" checked when performing the import. This removes the identification key that EA uses to match the content in the XMI to that of the model.
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

Ericga

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: How to reimport the same package?
« Reply #3 on: April 16, 2010, 10:12:05 pm »
Thank you for answering. Maybe the root of the issue is the absence of UUID in the XMI. Is there a way to deal with that?

If there is not, and I want to attempt modifying the XMI to include globally unique identifiers, do I need to use real GUIDs? The XMI standards seems to accept any kind of string with the propperper prefix: The values of this attribute should be globally unique strings prefixed by the type of identifier. There is also an example in the standard that uses a simple string:

<UML:Operation xmi:id="idO1" xmi:label="op1" xmi:uuid="DCE:1234">

So if I have to make up my own UUIDs, my questions are:

1) is there a recommendation about the prefix that should be used? DCE seems to be reserved and I am not sure if I cam improvise one?

2) If any string can be used (i.e. not necessarily GUID-like) is there any limitation in length?

Thanks again for any tip

Eric

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13510
  • Karma: +573/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to reimport the same package?
« Reply #4 on: April 16, 2010, 11:07:19 pm »
Eric

I think EA looks at the ea_guid's in the xmi file. I think there are stored in an EA specific xmi extension.
Try exporting a simple package with one class and inspect the xmi file.

Geert

Ericga

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: How to reimport the same package?
« Reply #5 on: April 16, 2010, 11:26:11 pm »

Geert,

If it is an EA specific extension, how can I re-import XMI that was generated by another system? (an OO database in this case)


Eric

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13510
  • Karma: +573/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to reimport the same package?
« Reply #6 on: April 16, 2010, 11:50:44 pm »
I don't think you can.

Geert

Ericga

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: How to reimport the same package?
« Reply #7 on: April 16, 2010, 11:56:14 pm »
 One can't expect code to be static so how can I resynch then?

Ericga

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: How to reimport the same package?
« Reply #8 on: April 16, 2010, 11:58:45 pm »

Nizam,

You said:

> You might as well do a compare with XMI (if you have XMI 1.1), and merge from baseline to the model.

How can I compare and merge? This seems a possible solution.

Ericga

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: How to reimport the same package?
« Reply #9 on: April 17, 2010, 12:46:26 am »
I tried to follow Nizam's suggestion. I have found the Manage Baselines... menu. I am not familiar yet with that functionality but the menu doesn't do anything. I also found Compare from XMI in Package Control but got this error:

Error: Unable to compare to file. Requires XMI 1.1 from Enterprise Architect.

So I assume EA compare tool is only compatible with EA XMI and not with XMI standard files in general.

Eric

beginner

  • Guest
Re: How to reimport the same package?
« Reply #10 on: April 17, 2010, 12:53:21 am »
You obviously found out that XMI is not XMI, unfortunately.

b.

Ericga

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: How to reimport the same package?
« Reply #11 on: April 17, 2010, 06:42:23 am »

Back to square 1: is there no solution to re-import a package?

Gary W.

  • EA User
  • **
  • Posts: 139
  • Karma: +0/-0
    • View Profile
Re: How to reimport the same package?
« Reply #12 on: April 17, 2010, 08:56:35 am »
Then it's really 'migrate' rather than 're-import', and as others have said, "XMI" is really 100% transferrable between vendors (ALL vendors, not just Sparx).

There are products out there to do just that (e.g. http://www.metaintegration.net/Products/MIMB/MicrosoftVisio.html) but they're usually REALLY expensive.

What was the product that originally created the XMI?


Nizam Mohamed

  • EA User
  • **
  • Posts: 193
  • Karma: +1/-0
    • View Profile
Re: How to reimport the same package?
« Reply #13 on: April 19, 2010, 09:13:53 am »
Eric,
      EA can import from other XMI, but will generate EA specific UIDs in the process. so changing the original(non-EA) XMI and attempting to re-synch will most likely result in duplication of packages as you've mentioned.

You might as well write to sparxsupport with some details on how the XMI was originally created, for a more elaborate response.

Ericga

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: How to reimport the same package?
« Reply #14 on: April 19, 2010, 10:02:16 am »
Thanks. I might resort to that but I have never had any luck with sparx support. I've asked for 2 years to display entity names in diagrams without truncating them and I have never even been able to make them admit it's ludicrous the fully qualified name is not available in the properties dialog of an entity, so I won't start discussing something as complex as XMI with sparx's support when it's not possible to make them admit something obvious.

The current limitations with XMI are frustrating but I can certainly understand why they exists and why sparx has not removed them. It's probably a lot of work and there probably are feature requests with higher priorities.

An EA project seems to be an access database (at least I can open it with it). I can't say I like Access but if I can find time to figure out the schema it should be possible to update all tuples defining a diagram to use the same objects from another model and then delete the original one. I of course define "same objects" in this case as objects with the same fully qualified names.

eric