Archi Forum

Archi => Share your Models, Templates and Reports => Topic started by: Volker Augustin on May 24, 2017, 09:46:55 AM

Title: Importing Open Exchange File generated by Archi into Sparx Systems EA
Post by: Volker Augustin on May 24, 2017, 09:46:55 AM
All,

at the moment I am using both Archi and Sparx Systems Enterprise Architect for modelling.
Recently, I wanted to export an ArchiMate 3.0 model from Archi and import into EA.
However, it seems EA only has support to import ArchiMate 2.0 models.
Therefore, I wrote a small XML conversion using xmlstarlet that I wanted to share:


@echo off
set INPUTFILE=%1
set OUTPUTFILE=%2
set INTERMEDIATEFILE=CONVERSION_INTERMEDIATE.xml

xml  ed ^
  -N x=http://www.opengroup.org/xsd/archimate/3.0/ ^
  -N dc=http://purl.org/dc/elements/1.1/ ^
  -i "/x:model" -t attr -n "xmlns:dc" -v "http://purl.org/dc/elements/1.1/" ^
  -u "/x:model/@xsi:schemaLocation" -v "http://www.opengroup.org/xsd/archimate http://www.opengroup.org/xsd/archimate/archimate_v2p1.xsd http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2008/02/11/dc.xsd" ^
  -i "/x:model/x:name" -t elem -n "metadata" -v "" ^
  -s "/x:model/metadata" -t elem -n "schema" -v "Dublin Core" ^
  -s "/x:model/metadata" -t elem -n "schemaversion" -v "1.1" ^
  -s "/x:model/metadata" -t elem -n "dc:title" -v "Title" ^
  -s "/x:model/metadata" -t elem -n "dc:subject" -v "Subject" ^
  -s "/x:model/metadata" -t elem -n "dc:format" -v "The Open Group ArchiMate Exchange Format" ^
  -s "/x:model/metadata" -t elem -n "dc:language" -v "en" ^
  -r "//*/x:name" -v label ^
  -r "/x:model/x:label" -v name ^
  -r "/x:model/x:organizations" -v organization ^
  -r "//*/x:item/@identifierRef" -v identifierref ^
  -r "//*/x:node/@elementRef" -v elementref ^
  -r "//*/x:connection/@relationshipRef" -v relationshipref ^
  -u "//*/x:relationship[@xsi:type=\"Access\"]/@xsi:type" -v "AccessRelationship" ^
  -u "//*/x:relationship[@xsi:type=\"Aggregation\"]/@xsi:type" -v "AggregationRelationship" ^
  -u "//*/x:relationship[@xsi:type=\"Assignment\"]/@xsi:type" -v "AssignmentRelationship" ^
  -u "//*/x:relationship[@xsi:type=\"Association\"]/@xsi:type" -v "AssociationRelationship" ^
  -u "//*/x:relationship[@xsi:type=\"Composition\"]/@xsi:type" -v "CompositionRelationship" ^
  -u "//*/x:relationship[@xsi:type=\"Flow\"]/@xsi:type" -v "FlowRelationship" ^
  -u "//*/x:relationship[@xsi:type=\"Realization\"]/@xsi:type" -v "RealisationRelationship" ^
  -u "//*/x:relationship[@xsi:type=\"Serving\"]/@xsi:type" -v "UsedByRelationship" ^
  -u "//*/x:relationship[@xsi:type=\"Specialization\"]/@xsi:type" -v "SpecialisationRelationship" ^
  -u "//*/x:relationship[@xsi:type=\"Triggering\"]/@xsi:type" -v "TriggeringRelationship" ^
  -m "/x:model/x:views/x:diagrams/x:view" "/x:model/x:views" ^
  -d "/x:model/x:views/x:diagrams" ^
  %INPUTFILE% > %INTERMEDIATEFILE%

sed -e "s/http:\/\/www\.opengroup\.org\/xsd\/archimate\/3\.0\//http:\/\/www\.opengroup\.org\/xsd\/archimate/g" %INTERMEDIATEFILE%  > %OUTPUTFILE%

DEL %INTERMEDIATEFILE%


Best regards,
Volker
Title: Re: Importing Open Exchange File generated by Archi into Sparx Systems EA
Post by: Phil Beauvoir on May 24, 2017, 09:48:23 AM
Hi Volker,

thanks for sharing!

I'm sure one day Sparx will come up to speed...  ;)

Phil
Title: Re: Importing Open Exchange File generated by Archi into Sparx Systems EA
Post by: steen.jensen@sll.se on October 13, 2017, 22:29:38 PM
From this sommer, release of Sparx EA 13.5 the Archimate Exchnage format v3 is working okey to share models between Sparx EA and Archi.
Title: Re: Importing Open Exchange File generated by Archi into Sparx Systems EA
Post by: Phil Beauvoir on October 13, 2017, 22:53:14 PM
Quote from: steen.jensen@sll.se on October 13, 2017, 22:29:38 PM
From this sommer, release of Sparx EA 13.5 the Archimate Exchnage format v3 is working okey to share models between Sparx EA and Archi.

Thanks for the info, Steen.
Title: Re: Importing Open Exchange File generated by Archi into Sparx Systems EA
Post by: slawomir on December 29, 2022, 15:11:57 PM
I've tried to import to EA 16.1 model from Archi (Open Exchange File xml). There is no messages and effects. Someone may help me? Any suggestions?
Title: Re: Importing Open Exchange File generated by Archi into Sparx Systems EA
Post by: Phil Beauvoir on December 29, 2022, 15:58:17 PM
Quote from: slawomir on December 29, 2022, 15:11:57 PMI've tried to import to EA 16.1 model from Archi (Open Exchange File xml). There is no messages and effects. Someone may help me? Any suggestions?

Did you contact Sparx support about this? Also if you provide more details about the problem it would help.
Title: Re: Importing Open Exchange File generated by Archi into Sparx Systems EA
Post by: jsimoncello on February 03, 2023, 14:53:40 PM
Hi
I am benchmarking EA 16.1 Vs Archi and I have achieved importing a huge (20000+ concepts, 700 views+) archi model in EA.

It crashed on the first attempt though, I am not sure why, I had two objects with the same ID (don't ask) in my archi model and once I corrected this problem, everything was OK on import

EA Ui is a bit messy to say the least, are you sure you're importing from "Specialize > Technologies > ArchiMate > Import Model Exchange File" ?