Archi Forum

Discussion Boards => Archi Development => Topic started by: zakariaEIRA on February 02, 2016, 10:40:16 AM

Title: OpenXML format to ADMS-AP
Post by: zakariaEIRA on February 02, 2016, 10:40:16 AM
Dear Archi-ists,

ADMS is a W3C standard for describing re-usable assets [1]. ADMS-AP [2] is an application profile of ADMS used on Joinup, the catalogue of re-usable and interoperable solution hosted by the European Commission [3], to describe re-usable assets.

In this context we are developing an Archi plug-in to export building blocks to an ADMS-AP compliant RDF/XML file based on OpenXML format. This allows Enterprise/Solution Architect to develop models in Archi and export them in a file that is readable by Joinup and other platform that understand ADMS-AP.

In the model we differentiate between an architectural building block and solution building block by using "stereotyping" [4]. In essence a solution building block is a specialization of an architectural building representing a re-usable asset (software, framework, tool...).

We still in development but we'd like to know the procedure for hosting the plug-in on the Archimatetool website. We believe it's a great addition to the plug-in library.

[1] W3C ADMS - (
[2] ADMS-AP - (
[3] Joinup - (
[4] Stereotyping in ArchiMate - (

Best Regards,

Zakaria (PwC) - contractor European Commission.
Title: Re: OpenXML format to ADMS-AP
Post by: Jean-Baptiste Sarrodie on February 02, 2016, 10:47:33 AM

Thank you for your interrest and (upcoming) contribution to Archi.

What I would suggest is the following: I can create a repository under the umbrella of archi-contrib ( GitHub Organization. This means that your code and plugin releases would become visible as part of official contributions. Then, when a useable release of your plugin will exists, Phil could add a link to it in either or (@Phil: it's maybe time to revamp this part as having plugins listed on 2 separate pages in not really useful).

If this suits you, then just provide me a suggested name for the repository to be created and the github username of the repo admin.


Title: Re: OpenXML format to ADMS-AP
Post by: Phil Beauvoir on February 02, 2016, 11:56:38 AM

@Zakaria - that sounds like an interesting project. Please keep us updated. As Jean-Baptiste says, you could host the code on GitHub at that location, if you like. Also, it sounds like it would be a nice subject for a small blog post. Would it be possible to write about it?

@JB - the "plugins" page is the official page for plugins that we can support (TOG plugin atm). These plugins are packaged in a certain way so that they can be installed easily. We could divide it into official and third-party plugins. I just want to make sure that it's clear that we cannot support (i.e. fix bugs, etc) the third party plugins.

Title: Re: OpenXML format to ADMS-AP
Post by: zakariaEIRA on February 03, 2016, 08:50:10 AM
Hi guys,

Thanks for the update and the answers. I'll discuss this with the Commission and see how to proceed. We're currently finishing up the code and writing documentation. We can provide a blog post.

We'll keep you posted on the project.


Title: Re: OpenXML format to ADMS-AP
Post by: inigoEIRA on April 13, 2016, 14:30:03 PM
Hello guys,

I'm working with Zakaria in the development of the ADMS-AP plugin for Archi, but we are facing some problems when exporting the plug-in that we can't solve, so we kindly ask for your help.

We started following the Developer Guides in Archi for developing import and export plug-ins and everything went perfectly, we were able to run Archi in Eclipse and the exporter worked. After that, we exported the plug-in as a jar file and added it to Archi installation plugins folder, as you explain in "Deploying the plug-in" section.

The problem is that when we open Archi the plug-in doesn't work and when we check the "Plug-ins" tab in Archi installation details, there is no information about it. However, in the "Configuration" tab and under the "*** Plug-in Registry" area, we can see that the plug-in is detected: org.ISA.export ( "ADMS-AP Export Model" [Installed]

We think we are having some problem when exporting the plug-in as a jar file, but we can't find the solution, so we would like to know if you have any idea on how we could solve it.

Thank you very much


Title: Re: OpenXML format to ADMS-AP
Post by: Phil Beauvoir on April 13, 2016, 14:47:48 PM
Hi Inigo,

without seeing the project setup or the jar file it's hard to say. Have you compared your plugin's files (MANIFEST.MF, plugin.xml, build.xml, etc) with some Archi plugins to see if something is not getting declared?

Title: Re: OpenXML format to ADMS-AP
Post by: Hervé on April 15, 2016, 14:48:06 PM
Hi Inigo,

you may run "Archi.exe -consolelog" to check if there is a runtime exception.

Hope this helps
Title: Re: OpenXML format to ADMS-AP
Post by: inigoEIRA on April 15, 2016, 16:04:05 PM
Hi guys,

Thank you very much for your replies. We compared the plugin's files with other Archi plugins and couldn't find the error. We also check the console log and we couldn't find any runtime exception.

We leave attached the jar file, in case you can find which is the problem

Title: Re: OpenXML format to ADMS-AP
Post by: Phil Beauvoir on April 15, 2016, 16:07:13 PM
Hi Inigo,

I looked inside the jar file, and it does not contain binary code, only source code. This is your problem. Please take another look at the export dialog, and make sure your build settings are correct.

Edit - I seem to recall this happened to me once. I'd forgotten to tick something in the build file, or maybe it was something set in the MANIFEST.MF file, I can't remember. It's worth doing a double-check comparing your settings with those in the example.

Title: Re: OpenXML format to ADMS-AP
Post by: inigoEIRA on April 19, 2016, 12:18:46 PM
Hello Phil

We double checked the build settings and compared them with the example but we still can find the origin of the problem. We have uploaded the code to Github [1] in case you can check it and help us with this problem.

Thank you very much for all your help


[1] Github ADMS Exporter:
Title: Re: OpenXML format to ADMS-AP
Post by: Phil Beauvoir on April 19, 2016, 12:46:22 PM

I succeeded in exporting the jar from your code in GitHub. However, I needed to make some changes first:

When I exported the project in the wizard the only settings chosen was "Destination" as "Directory" and ticked "Allow for binary cycles in target platform" under Settings. The plugin jar exported correctly and once I had copied it to the target Archi "plugins" folder I could see the "Export...." menu item but it does not actually work because of the dependency on org.opengroup.archimate.xmlexchange.
Title: Re: OpenXML format to ADMS-AP
Post by: inigoEIRA on April 20, 2016, 16:40:34 PM
Hi Phil

Thank you for your reply. We made the changes you said about the .project file, the dependency of JUnit and the org.opengroup.archimate.xmlexchange package. But after duplicating the package, we find now the following problem when we click Export->ADMS-AP in Archi.

Code: [Select]
!ENTRY org.eclipse.ui 4 0 2016-04-20 17:35:08.991
!MESSAGE Unhandled event loop exception
at org.ISA.ADMS_Export.wizard.ExportToADMSPage.createControl(
at org.eclipse.jface.wizard.Wizard.createPageControls(
at org.eclipse.jface.wizard.WizardDialog.createPageControls(
at org.eclipse.jface.wizard.WizardDialog.createContents(
at org.eclipse.jface.window.Window.create(
at org.eclipse.jface.dialogs.Dialog.create(
at org.ISA.ADMS_Export.ADMSExportProvider.export(
at org.eclipse.jface.action.Action.runWithEvent(
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(
at org.eclipse.jface.action.ActionContributionItem.access$2(
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(
at org.eclipse.swt.widgets.EventTable.sendEvent(
at org.eclipse.swt.widgets.Display.sendEvent(
at org.eclipse.swt.widgets.Widget.sendEvent(
at org.eclipse.swt.widgets.Display.runDeferredEvents(
at org.eclipse.swt.widgets.Display.readAndDispatch(
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$
at org.eclipse.core.databinding.observable.Realm.runWithDefault(
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(
at org.eclipse.ui.internal.Workbench$
at org.eclipse.core.databinding.observable.Realm.runWithDefault(
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
at com.archimatetool.editor.Application.start(
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(
at org.eclipse.equinox.launcher.Main.basicRun(
at org.eclipse.equinox.launcher.Main.main(

However, when we use the package org.opengroup.archimate.xmlexchange and we run it in Eclipse we have not that problem. The code can be found in Github [1]

[1] Github ADMS Exporter
Title: Re: OpenXML format to ADMS-AP
Post by: Phil Beauvoir on April 20, 2016, 17:21:41 PM

it seems that duplicating the code in this way will not work because of various dependencies. You'd have to do a lot more refactoring than simply copying the code for this to work.

Your plugin is relying on the XML exporter plugin which has its own internal code and therefore it can't guarantee any external behaviour and this is why its code is not public. It was not really designed to be called from another plugin. Possibly using your own wizard on the export plugin is causing a problem. Really Eclipse works on the basis of extensions to existing plugins, and there are also issues with classpaths.

It seems to me that you want the user to export an ArchiMate model to an exchange format file and then you will apply an XSLT to it in one operation. Perhaps there is another way to do this? Perhaps in the end it would work if the exporter package was made public?

Title: Re: OpenXML format to ADMS-AP
Post by: Phil Beauvoir on April 20, 2016, 18:43:37 PM
I made some tests. It seems that the best way should be to make the exporter plugin package public. I have done this and committed this to Github. So, go back to your original plan, do not copy and paste the exporter code. I tested the exported jar and it worked up to a point. The temporary file is created, but this part does not work:

        CodeSource code=ADMSExporter.class.getProtectionDomain().getCodeSource();   
         String location=code.getLocation().toString();
         location = location.replace("file:/", "");
        location = location + "src/org/ISA/ADMS_Export/EIRA_Archi_xml-to-ADMS_rdf_v0.02.xslt";

You need to get that location another way.

This is the MANIFEST.MF file I used:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ADMSExport
Bundle-SymbolicName: org.ISA.exportAI;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: PwC
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.eclipse.ui,
Export-Package: org.ISA.ADMS_Export
Bundle-ClassPath: saxon9-xqj.jar,

And this is the file:

jars.compile.order = org.isa.adms.jar = src/ = bin/
bin.includes = META-INF/,\