Book a Demo

Author Topic: Import of XMI File missing Attribute Initial Value  (Read 5985 times)

chrisjenkins

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Import of XMI File missing Attribute Initial Value
« on: May 18, 2014, 11:59:40 pm »
If I export my package as an XMI file and then re-import, the initial values that have been set in the attributes of the components are null?

Any ideas.

Chris

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Import of XMI File missing Attribute Initial V
« Reply #1 on: May 19, 2014, 08:56:51 am »
Make sure you're using the round-trip options instead of the publish options.

chrisjenkins

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Import of XMI File missing Attribute Initial V
« Reply #2 on: May 20, 2014, 07:37:03 pm »
Hi,

This sounds the perfect answer although I can't find the round trip options in V11.0.1103 under export (or import).

Where do these options specifically reside?

Chris

chrisjenkins

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Import of XMI File missing Attribute Initial V
« Reply #3 on: May 20, 2014, 07:45:05 pm »
[highlight][/highlight]The help says
"The exported XMI file contains all the information required for completely round-tripping the package within Enterprise Architect; that is, performing Enterprise Architect-to-Enterprise Architect transfers."

And the exported file contains the following xml see highlighted below.

So is the issue an import issue or an error?

Chris


                  <element xmi:idref="EAID_9F8181A0_C8B5_4752_BF46_13792DEFD6F6" xmi:type="uml:Component" name="FRED" scope="public">
                        <model package="EAPK_784599C6_CECB_4cb2_BD1A_26AB0C8889D3" tpos="1" ea_localid="9" ea_eleType="element"/>
                        <properties isSpecification="false" sType="Component" nType="0" scope="public" isRoot="false" isLeaf="false" isAbstract="false"/>
                        <project author="cjenkins" version="1.0" phase="1.0" created="2014-05-18 12:41:32" modified="2014-05-18 12:41:42" complexity="1" status="Proposed"/>
                        <code gentype="Java"/>
                        <style appearance="BackColor=-1;BorderColor=-1;BorderWidth=-1;FontColor=-1;VSwimLanes=1;HSwimLanes=1;BorderStyle=0;"/>
                        <tags>
                              <tag xmi:id="EAID_08146544_8489_4751_8F9F_14706F76CE14" name="ID" value="ID001" modelElement="EAID_9F8181A0_C8B5_4752_BF46_13792DEFD6F6"/>
                        </tags>
                        <xrefs/>
                        <extendedProperties tagged="0" package_name="Base"/>
                        <attributes>
                              <attribute xmi:idref="EAID_9EC2EA89_5090_422a_8B56_90C44268D1E4" name="ID" scope="Public">
                                    [highlight]<initial body="A0001"/>
[/highlight]                                    <documentation/>
                                    <model ea_localid="3" ea_guid="{9EC2EA89-5090-422a-8B56-90C44268D1E4}"/>
                                    <properties derived="0" collection="false" static="1" duplicates="0" changeability="frozen"/>
                                    <coords ordered="0"/>
                                    <containment containment="By Value" position="0"/>
                                    <stereotype/>
                                    <bounds lower="1" upper="1"/>
                                    <options/>
                                    <style/>
                                    <styleex value="IsLiteral=0;volatile=0;"/>
                                    <tags/>
                                    <xrefs/>
                              </attribute>
                        </attributes>
                  </element>

chrisjenkins

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Import of XMI File missing Attribute Initial V
« Reply #4 on: May 21, 2014, 06:03:03 pm »
I still have the same issue, the round trip option seems to be the default for version 11, so the value is added to the exported XMI file but how do I get it back in?

Chris

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import of XMI File missing Attribute Initial V
« Reply #5 on: May 21, 2014, 06:45:24 pm »
I don't use round-tripping but IIRC EA does not read the body of imported sources, just the headers. The code body is only spit out on code generation.

They now have some high sophisticated parser which might enable you to get hold of the code body but I even have not touched that (although it seems to be some very interesting toy).

q.
« Last Edit: May 21, 2014, 06:47:44 pm by qwerty »