Archi Forum

Archi Plug-ins => jArchi => Topic started by: Xavier Mayeur on December 02, 2021, 07:38:20 AM

Title: jArchi script to import Aris XML-based (AML) models
Post by: Xavier Mayeur on December 02, 2021, 07:38:20 AM
Hello,

I have a number of Archimate models made with ARIS that I would like to import in Archi. I don't have any ARIS license, to I cannot use ARIS functionality to exchange the models.

1- Does anyone have already made some jArchi script to import an ARIS model ?
2- If not, I am struggling with the javascript methods to import the XML model into some java object that I can parse to create Archi objects. Does someone has some code snippets working with jArchi to parse an XML text?

Thanks
Title: Re: jArchi script to import Aris XML-based (AML) models
Post by: Phil Beauvoir on December 07, 2021, 17:45:48 PM
Hi, it's unlikely that anyone has done (1) as a I suspect it's not a trivial task. For (2) you'll need some JS library to read the XML into some in-memory model similar to the Java JDOM library. Have you found anything yet?
Title: Re: jArchi script to import Aris XML-based (AML) models
Post by: yveszoundi on December 08, 2021, 00:17:33 AM
For the second point, I would not bother with JavaScript itself, based on what I believe to be available/possible so far (outside the browser or a full-blown nodejs context). I would deal with XML parsing using Java interop in jArchi, with default Java DOM libraries unless it's too annoying:

If you're more comfortable with Python, you could start with a shell process returning JSON in the standard output and capture that via jArchi (Java process to run Python and grab the output). In a second effort, the code could be ported "relatively easily" for someone familiar to the Aris format and Java programming.
Title: Re: jArchi script to import Aris XML-based (AML) models
Post by: Xavier Mayeur on December 21, 2021, 21:44:26 PM
I made some python scripts to parse the Aris AML file and generate an Open File Exchange document.
See on my GIT Repo (https://github.com/xmayeur/archiScript/tree/main/python) the 'parseAML.py' script.
Not yet fully documented, nor implementing all functionality, but it is good enough to import an ARIS model into Archimate Tool.

New version update on 21/01/2021.