Author Topic: Importing XMI from Altova UModel 2006 r2  (Read 8852 times)

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Importing XMI from Altova UModel 2006 r2
« on: November 06, 2006, 03:53:48 am »
Hiya guys

I have been handed a problem!!!

I'm evaluating EA, and I am enjoying the experience...

HOWEVER... I have to share some of my work with other folks, and not all of them are using EA. I haven't completed the 'Tools you use' survey yet.

The 'fool' in the office next door is using Altova UModel and we got to talking about how much stuff I give him. We was well happy bunnies, there I was pushing XMI stuff and him gobbling it up... Shame about the diagrams but can't have everything we thought.

It's a bit of a downer to discover that EA can't do the same.

Whenever I try and import an XMI file generated by UModel, EA announces that it contains errors via a message box and doesn't import anything.

This is something of a downer, and I'm at a loss... what errors, where?

Any help suggestions, solutions or workarounds would be really welcome...

Regards
Kevin



« Last Edit: November 06, 2006, 08:21:43 pm by badboyabout »

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Importing XMI from Altova UModel
« Reply #1 on: November 06, 2006, 05:55:14 am »
Hi Kevin,

If you do a search for XMI in the forums, you'll see some discussions thereon.

In principle, though, XMI is extremely problematic. For example, can Altova UModel re-import the XMI it just emitted?  If not, look there...

As users, our experience has been that XMI problems, in the main, are not caused by EA.  It's more often than not the other product.

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

barny451

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Importing XMI from Altona UModel
« Reply #2 on: November 06, 2006, 07:55:46 am »
I think its probably fairer to say that the ability to reimport exported xmi is a highly desirable (i.e. effectively necessary) but not sufficient indicator of good xmi interchange.  EA certainly has this ability.

However in any xmi interchange there are two parties, and both must agree before interchange can happen.  If interchange doesn't happen you don't know from just this fact which end is at fault.  Is the following statement true: "I claim I can speak French well, and I certainly understand myself, therefore if I speak French to someone who claims to understand French and they don't understand it, it is their fault.  Also if someone speaks what they claim is French to me and I don't understand it, it must be their fault."?

Have you tried any/all variations in XMI format that UModel can export?  EA generates "windows-1252" encoding in its generated XMI (in the very first line of the xmi file), it might be worth checking that UModel generates the same?  If its encoding is different, try editing the xmi file in a text editor (notepad?) to read windows-1252.  You could always look at a xmi file generated by EA for an example of this.

On a more cheerful note, why don't we start a mynorca (acronym backwards) competition on XMI: I reckon it stands for eXtremely Minimal Interchange  ;D

HTH
Barny
« Last Edit: November 06, 2006, 09:34:54 am by barny451 »

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: Importing XMI from Altova UModel 2006 r2
« Reply #3 on: November 06, 2006, 09:06:17 pm »
Hi Paola and Barny

Thank you for reply' s, at least I'm not feeling quite so lonely.

Umodel seems to have no problem consuming it's own XMI, it also had no problem consuming the XMI from EA. :) oh for the days of the waterfall...

Looking at the UModal's XML file, it's 'encoding="UTF-8"' 'I'll poke Phil into trying to change that... I've read the EA Help but can't find anything about changing the EA default; there does seem to be an option to select encoding in the Options dialog, xmL tag (but isn't that to do with EA's XSD tooling?).

I have also found the import log file but it's not that useful, it doesn't give any indication of the error thats stopping the show. Is there a way to get more detail?

Again thanks,
Kevin



Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: Importing XMI from Altova UModel 2006 r2
« Reply #4 on: November 07, 2006, 01:20:42 pm »
UTF-8 encoding shouldn't cause a problem for EA.

What's the error message that it gives?  That may shed some light on the issue.

It may also be worth sending in a file to sparx support.  We should be able to verify if the XMI is valid (in which case we'll fix our import) or if it's invalid (in which case you'll have to ask Altova)

softwaredeveloper

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Importing XMI from Altova UModel 2006 r2
« Reply #5 on: November 08, 2006, 10:52:35 am »
Hey !

Just tested EA and had the same problem !
Importing in UModel works perfect but EA doesn't give me any message what is wrong ! (Also used several encodings but nothing changed)
Maybe you can give us a short info what to change to be able to import anything ?

Cheers,
the softwaredeveloper

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: Importing XMI from Altova UModel 2006 r2
« Reply #6 on: November 08, 2006, 01:17:49 pm »
I don't have your XMI, so I don't know what is wrong with it.

As I said in my previous post, if you send in an XMI file to sparx support we'll have a look at it and see what we can do about it.

softwaredeveloper

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Importing XMI from Altova UModel 2006 r2
« Reply #7 on: November 09, 2006, 12:09:01 pm »
Hi !

Here is the easiest sample I could make:

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://schema.omg.org/spec/UML/2.1" xmi:version="2.1">

       <xmi:Documentation contact="www.altova.com" exporter="Altova UModel2006r2" exporterVersion="2.1"/>
       <uml:Package xmi:id="U00000001-7510-11d9-86f2-000476a22f44" name="Root">
               <packagedElement xmi:type="uml:Package" xmi:id="U00000003-7510-11d9-86f2-000476a22f44" name="Component View" visibility="public"/>

       </uml:Package>
</xmi:XMI>

UModel can export in several encodings but you meant UTF-8 is okay so I used the default.
I have also checked the XMI specification at OMG and everything looks okay for me so I think it's simply a bug in EA ?


Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: Importing XMI from Altova UModel 2006 r2
« Reply #8 on: November 09, 2006, 01:21:06 pm »
Hiya guys

I'm sorry I've been away trying to look busy....

Thankyou Simon, I felt sorta cool with UTF-8. . . .

This is what the model consists of in UMODEL


Altova UModeL 'export options


the export produced a cool success message


The resulting XMI 2.1 UML 2.1 is



this is the EA import nettings


and this is what I get after import


This is the log file (located in the same directory as the xvii title)


Thinking that 2-1 isn't yet finalized or whatever, I'd give 2-0 ago



Result


I wasn't able to tell Altora User Forum much, COS "Wots the error?"
« Last Edit: November 09, 2006, 01:44:04 pm by badboyabout »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: Importing XMI from Altova UModel 2006 r2
« Reply #9 on: November 09, 2006, 02:16:41 pm »
Hi guys,

I've had a look at what's going on with your XMI.

The basic problem that both of you are encountering is that EA is expecting the "Root" package to be "uml:Model", not "uml:Package".  In the short term, if you change that, EA will import the file without any problems.  We'll add handling of this situation to our importer as soon as possible.

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://schema.omg.org/spec/UML/2.1" xmi:version="2.1">

  <xmi:Documentation contact="www.altova.com" exporter="Altova UModel2006r2" exporterVersion="2.1"/>
  <uml:Model xmi:id="U00000001-7510-11d9-86f2-000476a22f44" name="Root">
     <packagedElement xmi:type="uml:Package" xmi:id="U00000003-7510-11d9-86f2-000476a22f44" name="Component View" visibility="public"/>

  </uml:Model>
</xmi:XMI>

Of course, I don't know what the rest of the UModel XMI looks like or if EA will encounter any other problems.  If you want to send in a complete XMI file to [email protected] we can have a look at it and make sure everything else works.

softwaredeveloper

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Importing XMI from Altova UModel 2006 r2
« Reply #10 on: November 10, 2006, 11:06:50 pm »
Hey !

Not very tolerant from EA but yes it works then :-).

Thanks a lot !

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: Importing XMI from Altova UModel 2006 r2
« Reply #11 on: November 11, 2006, 02:11:14 pm »
Hi'ya Softwaredeveloper and Simon

that certainly lets EA complete the import without raising any error dialogs. .

BUT... it is model import-that I'm after ???

Lets try and import this model, just a simple package structure

This is the XMI after modification as Simon suggested


This is an export of the EA model  pre-import


this is the resulting model post import


Admittedly EA completes the import with no sign of an error.... but where are TestPackage, OuterPackage and InnerPackage

Sorry if I'm demanding a lot

Regards
Kevin

softwaredeveloper

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Importing XMI from Altova UModel 2006 r2
« Reply #12 on: November 15, 2006, 10:07:41 am »
Hi Kevin !

Did you get any answer what to change additionally ?
The XMI UModel exports looks quite correct, especially: I see no difference between the "Component View" Package and "TestPackage", "OuterPackage", "InnerPackage",... so I'm wonderng what's going on here  :o ?

Cheerio

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: Importing XMI from Altova UModel 2006 r2
« Reply #13 on: November 15, 2006, 01:30:02 pm »
My answer describes a way to have the 'Root' package treated as a container for a single package.  Obviously that isn't what was required for the Altova import.

I'm not sure if this is the best way to get your import but you should be able to get the import closer to what you want by making the following (more involved) change.

Add a new node around your uml:Package node as follows.
Code: [Select]
<uml:Model xmi:type="uml:Model" name="EA_Model" visibility="public">
</uml:Model>

Change your top level package to be consistent with the packages below it.
Code: [Select]
<packagedElement xmi:type="uml:Package" xmi:id="..." name="Root" visibility="public">
</packagedElement>
 (Keep your existing xmi:id)

colinc

  • EA User
  • **
  • Posts: 62
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Importing XMI from Altona UModel
« Reply #14 on: November 16, 2006, 08:28:49 pm »
Converting to UTF at least is pretty straightforward (now that I know after someone told me about a week ago...)

Go into your Tools/Options/XML menu on EA, and just specify UTF-8 as your encoding....


I am trying to interchange with Holocentric and have found they use
tag="documentation" value="text stuff" where EA uses

tag="description" value="text stuff"

oh well XSLT it is....

Colin