Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ppeeters on February 22, 2022, 07:55:00 pm

Title: MDG specializing Archimate3 and model exchange
Post by: ppeeters on February 22, 2022, 07:55:00 pm
Hi,

I've create a custom MDG where, for instance, I've a stereotype specializing an "Archimate3::Archimate_ApplicationComponent" by defining a set of Tagged value.
I noticed however that any instance of that stereotype in an archimate model is not exported at all using the Archimate "Model Exchange File" ; all other "native" archimate objects are present while my custom stereotype are just missing (they do appear when exporting as an XMI of course).
Is this the expected behaviour ? If yes, is there any "trick" to make them exportable using Model Exchange ?
Title: Re: MDG specializing Archimate3 and model exchange
Post by: Geert Bellekens on February 22, 2022, 08:01:23 pm
You can try to report that as a bug.

You can argue that your specialized element is still an ArchiMate_ApplicationComponent, so therefore it should be present in the model exchange file.

I doubt however they will export the extra tagged values.

Geert
Title: Re: MDG specializing Archimate3 and model exchange
Post by: ppeeters on February 23, 2022, 02:05:51 am
Thanks for your reply Geert.
That's what I did. Wait and see...
Title: Re: MDG specializing Archimate3 and model exchange
Post by: ppeeters on February 24, 2022, 11:20:31 pm
I got the answer from Sparx and, as expected, it works as designed : only Archimate2 and 3 stereotype are exported.
Title: Re: MDG specializing Archimate3 and model exchange
Post by: Geert Bellekens on February 24, 2022, 11:29:39 pm
I got the answer from Sparx and, as expected, it works as designed : only Archimate2 and 3 stereotype are exported.
I'm not really surprised either, but still a shame.

One of the problems is that the fact that your stereotype is a specialization of an ArchiMate stereotype, is not stored in the model itself, but only in your MDG.
So in order for the export process to know that it need to include your element as well it would need to parse every single MDG that is currently active.

Geert
Title: Re: MDG specializing Archimate3 and model exchange
Post by: Sunshine on February 25, 2022, 04:08:35 pm
I guess you could write a script to convert the stereotype to archimate stereotypes then do the export. Probably export everything but the extra tagged values you've added.
You could write some plugin script to create the model exchange but that would be a significant effort.
Title: Re: MDG specializing Archimate3 and model exchange
Post by: Sunshine on March 04, 2022, 04:39:49 am
Seeing another post on redefine archimate connectors by Geert gave me another idea. If you only have one specialization of Archimate_ApplicationComponent and are using it instead of Archimate_ApplicationComponent. For example you need all you Archimate_ApplicationComponent elements to have certain tagged values then you could consider just redefining Archimate_ApplicationComponent instead of specializing and that way you get the tagged values added to Archimate_ApplicationComponent and possibly a way to use the model exchange. I suspect however if it did work the ragged values might not be included in the exchange.
Just thought I'd share that idea so you can try it
Title: Re: MDG specializing Archimate3 and model exchange
Post by: Geert Bellekens on March 04, 2022, 05:33:59 am
Seeing another post on redefine archimate connectors by Geert gave me another idea. If you only have one specialization of Archimate_ApplicationComponent and are using it instead of Archimate_ApplicationComponent. For example you need all you Archimate_ApplicationComponent elements to have certain tagged values then you could consider just redefining Archimate_ApplicationComponent instead of specializing and that way you get the tagged values added to Archimate_ApplicationComponent and possibly a way to use the model exchange. I suspect however if it did work the ragged values might not be included in the exchange.
Just thought I'd share that idea so you can try it
They just might, but there are definitely no guarantees. I'll have a try to see what our redefined Archimate_ApplicationComponents do when exporting to the ArchiMate exchange format.

Geert
Title: Re: MDG specializing Archimate3 and model exchange
Post by: J.D. Baker on March 04, 2022, 10:16:36 am
The ArchiMate Model Exchange File format is a specification from the Open Group.  Since the ArchiMate specification does not include anything like the UML profile mechanism, a faithful representation of an ArchiMate model in the Exchange Format should not include stereotypes, etc.  If you want to exchange models between EA and another ArchiMate modeling tool, then the faithful representation is what you need.  An ArchiMate modeling tool like Archi would not be able to import and represent a UML stereotype.  If you want to exchange ArchiMate models between instances of EA, then you should use Native XML or XMI.