Importing Open Exchange File generated by Archi into Sparx Systems EA

Started by Volker Augustin, May 24, 2017, 09:46:55 AM

Previous topic - Next topic

Volker Augustin

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

Phil Beauvoir

Hi Volker,

thanks for sharing!

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

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

steen.jensen@sll.se

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.

Phil Beauvoir

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.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

slawomir

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?

Phil Beauvoir

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.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

jsimoncello

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" ?