Author Topic: XMI Round Trip - Data Loss?  Your help needed!  (Read 1939 times)

darren.sampson

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
XMI Round Trip - Data Loss?  Your help needed!
« on: November 12, 2006, 06:12:14 pm »
Hi Everyone,

On Friday, Paolo and I decided to check XMI Round Trip for our model. We did this using Beyond Compare - a very useful tool.

Firstly, we defined Beyound Compare rules to ignore data in the XMI files that will change every time.  If you have Beyond Compare, you can import these rules using the XML below:

Code: [Select]
<bc_settings>
 <rules>
   <list name="XML">
     <str_val name="RulesClass" value="TFreeForm1Rules"/>
     <str_val name="FileTypes" value="*.xml;*.xsl"/>
     <str_val name="Version" value="###"/>
     <int_val name="Tab" value="4"/>
     <int_val name="Speed" value="5"/>
     <int_val name="CodePage" value="0"/>
     <int_val name="Case" value="1"/>
     <str_val name="WS" value="-LTEB"/>
     <list name="Classify">
       <wstr_val name="-Delim" value="%3C!--%00--%3E%00M"/>
       <wstr_val name="-Delim" value="%3Ctimes%00%3E%00M"/>
       <wstr_val name="-Delim" value="ea_localid=%00%22 %00M"/>
       <wstr_val name="-Delim" value="localID=%00%22 %00M"/>
       <wstr_val name="+Delim" value="%22%00%22%00M"/>
     </list>
   </list>
 </rules>
</bc_settings>


This causes the timestamp lines and EA Local IDs (which seem to change all the time) to be shown as unimportant differences.

As background information, we have a skeleton model in an EAP file.  This EAP file only contains packages, and at a certain level of the hierachy the packages are controlled.  We have a file structure that matches the package structure in CVS which contains the XMI files. This allows us to create a complete model from scratch by running the EA batch import function for all controlled packages twice (twice due to issues with EA - thanks for this workaround Simon).  It also allows us to recreate different models using the same skeleton using different CVS tags.

To use Beyond Compare in a quick way, we checked out the XMI from CVS twice in two different directories - one as a reference, one for the live copy. We then did a double import (as above), then a batch export of all packages in the live directory tree.

We then used the following Beyond Compare Session to compare the live to the reference:

Code: [Select]
<bc_settings>
 <sessions>
   <list name="PROD Model XML with Reference">
     <str_val name="1" value="C:\@CVS Sandboxes\PROD_Reference\model"/>
     <str_val name="2" value="C:\@CVS Sandboxes\PROD_Sandbox\model"/>
     <int_val name="RO" value="0"/>
     <int_val name="Expand" value="1"/>
     <int_val name="ExpandDiffs" value="1"/>
     <int_val name="Auto" value="1"/>
     <int_val name="Readonly" value="0"/>
     <int_val name="UseCutoff" value="0"/>
     <int_val name="CutoffNew" value="0"/>
     <int_val name="UseDaysAgo" value="0"/>
     <int_val name="DaysAgo" value="0"/>
     <int_val name="CutoffLo" value="-779739552"/>
     <int_val name="CutoffHi" value="29820136"/>
     <int_val name="Tolerance" value="2"/>
     <int_val name="LeftAdjustLo" value="0"/>
     <int_val name="LeftAdjustHi" value="0"/>
     <int_val name="RightAdjustLo" value="0"/>
     <int_val name="RightAdjustHi" value="0"/>
     <int_val name="IncludeAttrib" value="0"/>
     <int_val name="ExcludeAttrib" value="0"/>
     <int_val name="SizeFilterMode" value="0"/>
     <int_val name="Criteria" value="258"/>
     <int_val name="Display" value="127"/>
     <int_val name="SortBy" value="1"/>
     <str_val name="Cols" value="n190s90t130"/>
     <list name="IncludeFiles">
       <str_val name="0" value="*.xml"/>
     </list>
     <list name="ExcludeFolders">
       <str_val name="0" value="CVS"/>
     </list>
   </list>
 </sessions>
</bc_settings>


This expands the directory tree to show files with important changes.  This process has proven to be very quick and effective.

The following issues were identified:

XMI roundtrip creates spurious attached Note connector entries
XMI roundtrip changes Component connector GUID
XMI roundtrip changes <anonymous> nested Enumerations to be corrupted
XMI roundtrip changes order of operations with different signatures
XMI roundtrip changes order of elements in a package
XMI roundtrip changes order of associated classifier links

and have been reported to Sparx.

Although we are using a fairly "different" approach, we believe these (and perhaps more) issues apply to all XMI import/export (eg. controlled packages, baselines).

Sparx cannot possibly test every combination - our use of the tool is only really limited by our imagination.  The input of the EA user community is vital. We'd like like to propose a push to identify all the bugs in this area. If you could do a similar check when you do XMI imports to ensure you don't lose any data and report all the bugs you find, we will all have a better tool to work with.

A 30-day trial of Beyond Compare is available from http://www.scootersoftware.com/

Darren.
« Last Edit: November 12, 2006, 09:36:55 pm by darren.sampson »
See the new Jobs Section on:EA Wiki...

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6148
  • Karma: +83/-85
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: XMI Round Trip - Data Loss?  Your help needed!
« Reply #1 on: December 20, 2006, 08:42:04 pm »
In diagnosing the Collaboration diagram bug: [size=13]Collaboration Messages trashed on XMI RTE[/size] we found an error in our previous specification.  Here's the updated one:
Code: [Select]
<bc_settings>
 <rules>
   <list name="XML">
     <str_val name="RulesClass" value="TFreeForm1Rules"/>
     <str_val name="FileTypes" value="*.xml;*.xsl"/>
     <str_val name="Version" value="###"/>
     <int_val name="Tab" value="4"/>
     <int_val name="Speed" value="5"/>
     <int_val name="CodePage" value="0"/>
     <int_val name="Case" value="1"/>
     <str_val name="WS" value="-LTEB"/>
     <list name="Classify">
       <wstr_val name="-Delim" value="%3C!--%00--%3E%00M"/>
       <wstr_val name="-Delim" value="%3Ctimes%00%3E%00M"/>
       <wstr_val name="-Delim" value="ea_localid=%00%22 %00M"/>
       <wstr_val name="-Delim" value="localID=%00%22 %00M"/>
       <wstr_val name="-Delim" value="%22$Revision%00$%22%00M"/>
       <wstr_val name="-Delim" value="modified=%22%00%22%00M"/>
       <wstr_val name="+Delim" value="%22%00%22%00M"/>
     </list>
   </list>
 </rules>
</bc_settings>


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

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6148
  • Karma: +83/-85
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: XMI Round Trip - Data Loss?  Your help needed!
« Reply #2 on: December 20, 2006, 08:50:10 pm »
Quote
Sparx cannot possibly test every combination - our use of the tool is only really limited by our imagination.  The input of the EA user community is vital. We'd like like to propose a push to identify all the bugs in this area. If you could do a similar check when you do XMI imports to ensure you don't lose any data and report all the bugs you find, we will all have a better tool to work with.

Darren and I would like to reiterate that we the users need to help Sparx here...

As more and more of us are using controlled packages and distributed model development, it is vital that XMI RTE is working flawlessly...

Please take the time to verify that your XMI RTE is working properly...

Paolo (and Darren)
« Last Edit: March 05, 2007, 07:50:41 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Essnet

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: XMI Round Trip - Data Loss?  Your help ne
« Reply #3 on: January 18, 2007, 05:35:49 am »
Hi Folks,

For me, the following bug is the most critical in EA. This is a show stopper for my company because we work on a distributed model development. Similar topic: http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.pl?board=suggestions;action=display;num=1160532884

We already have been reported this to Sparx.

Steps to reproduce:

1 - Create 2 packages A and B;
2 - Create 2 element, one (X) into package A and other (Y) into package B;
3 - Create a new diagram into package B;
4 - Create a simple link of element X from package A into diagram on package B.
5 - Create a simple link of element Y from package B into diagram on package B;
6 - Create a link, a dependency for example, from element Y to element X;
7 - Save diagram;
8 - Export packages A and B to xmi files;
9 - Delete both packages A and B from model;
10 - Import xmi file thats represents the package B;
11 - After open the diagram on package B, the link between elements Y and X and the element X is missing from diagram without any information about a dependency over package A that contains the element X. This is a serious bug because if you export the package B again to update the respective xmi file, the relationship will be lost definitively when both packages will be loaded in the model. :'(

Best regards,
Edvan

Essnet

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: XMI Round Trip - Data Loss?  Your help ne
« Reply #4 on: January 24, 2007, 09:18:02 am »
The issue wasn't corrected in new build 803  :-/  :'(.....

rgohagan

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: XMI Round Trip - Data Loss?  Your help ne
« Reply #5 on: March 05, 2007, 04:39:43 pm »
Has anyone found a workaround or fix for this?  We are experiencing the same problem and it is really affecting our ability to work in a distributed environment.

Does anyone know if 804 fixed this problem?

darren.sampson

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: XMI Round Trip - Data Loss?  Your help needed!
« Reply #6 on: March 05, 2007, 07:26:40 pm »
There are a number of issues fixed in 804 that are listed in the release notes.  We've been doing some testing and our results are in this thread.

We still have issues working in a distributed environment, but these are not strictly related to data loss in XMI Import/Export, but more to do with:
- merging changes in XMIs from multiple designers and
- the fact that connectors between elements in two different XMI can conflict if both XMI are not exported.

Darren
See the new Jobs Section on:EA Wiki...

Richard Freggi

  • EA User
  • **
  • Posts: 82
  • Karma: +3/-2
    • View Profile
Re: XMI Round Trip - Data Loss?  Your help needed!
« Reply #7 on: January 18, 2018, 02:02:35 am »
Hello
I am resuscitating this old thread because I have the same problem with v 13.10 and have not  been able to find a solution by searching. 
My problem is that if I export XMI from a package in a model, all information about external dependencies of that package and its elements are lost.  These external dependencies are critical design parameters so there must be a way to preserve them.  Thanks for any help!!!

qwerty

  • EA Guru
  • *****
  • Posts: 9442
  • Karma: +150/-139
  • I'm no guru at all
    • View Profile
Re: XMI Round Trip - Data Loss?  Your help needed!
« Reply #8 on: January 18, 2018, 02:29:25 am »
That's normal behavior. A package export contains only the element inside the package. External elements are referenced by their GUID. You need to either have them already in place or you need to import them with their according package.

q.

Richard Freggi

  • EA User
  • **
  • Posts: 82
  • Karma: +3/-2
    • View Profile
Re: XMI Round Trip - Data Loss?  Your help needed!
« Reply #9 on: January 18, 2018, 03:11:34 am »
Thanks qwerty!  I'll look into EA user guide for more info

If anyone has more pointers on how to make this work correctly please chime in... for example if I want to send the exported XMI to a 3rd party and need them to be aware of the dependencies while maintaining encapsulation of the dependent package. 

For example in StarUML (another UML CASE tool) the tool added a dummy element to the diagram (with an 'M' mark to show it was just a placeholder) so the 3rd party knew there was a dependency and what was the name and type of the element at the other end of the dependency.

qwerty

  • EA Guru
  • *****
  • Posts: 9442
  • Karma: +150/-139
  • I'm no guru at all
    • View Profile
Re: XMI Round Trip - Data Loss?  Your help needed!
« Reply #10 on: January 18, 2018, 03:21:31 am »
You could make a dummy project with the missing externals as an exact copy of your original one and strip the info except for the name. Then you can export that to provide your 3rd party with a stub.

q.

VKN

  • EA User
  • **
  • Posts: 185
  • Karma: +9/-1
    • View Profile
Re: XMI Round Trip - Data Loss?  Your help needed!
« Reply #11 on: January 18, 2018, 10:20:17 am »
Look for Create placeholders for missing External References during XMI 1.1/2.1 Import section in this link.

http://www.sparxsystems.com/enterprise_architect_user_guide/13.5/user_interface/xmlspecifications.html

Richard Freggi

  • EA User
  • **
  • Posts: 82
  • Karma: +3/-2
    • View Profile
Re: XMI Round Trip - Data Loss?  Your help needed!
« Reply #12 on: January 18, 2018, 09:39:39 pm »
qwerty and vkn, many thanks and this helps.

"Create placeholders for missing External References during XMI 1.1/2.1 Import" locks the placeholders (I have 13.10 professional desktop) and I can't unlock them to change colors or names (I can change fonts though).

Anyways that's already a big step forward, many thanks for your info!