Extending the Model with a new Element

Started by zxxz, April 02, 2017, 18:09:18 PM

Previous topic - Next topic

zxxz

Hello,

This old post: Adding New Elements and Relationships to Archi refers to Extending the Model with a new Element which is even older.

Before I get my hopes up, what would be the most up to date way to extend the Model with a new Element?
Is there any documentation that I can follow?

Thanks!
zxxz

Jean-Baptiste Sarrodie

Hi,

I'll let Phil provide a technical answer, but my question would be: why would you want to do that? This would no more be archimate and models created thus way could no more be opened without the "hacked" Archi.

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

zxxz

Hello JB,

Referring to Chapter 15 Language Customization Mechanisms in the specs it would still be (valid) Archimate  8).

I am aware of the portability issue that this would entail in regards to Archi but for the moment I can live with it and I have something in mind that might be portable (at the moment just an idea though...).

zxxz

Jean-Baptiste Sarrodie

Hi,

So there is some ununderstanding: Metamodel extension in Archi is not what ArchiMate call Language Customisation. There is currently no real way in Archi to match what Chapter 15 describe, but If you want to be close I'd suggest to simply use existing concepts and use the <<stereotype>> notation (or whatever you want) and add the stereotype name in a property (e.g. named stereotype). This way you'll be able to quickly identify concepts (through label) and also search them (through property). Of course, you wont have these new types in the palette, but you can easily create a small model containing only one view in which you put all these pre-set elements, and then open this view aside other views (just drag'n drop it where you want). Then using those elements is just a matter of doing a copy/paste. Bonus: in addition to properties and label, you'll also copy/paste visual attributes (color, font...) which can make sens in this contexte.

Regards,

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

zxxz

Hello,

I understand the <<stereotype>> approach (and the notation proposed by Gerben) but that's not what I am looking for.

I am curious to see if I can create new elements as specialisations of existing ones; for example creating Concern as specialisation of Driver, or Mobile Device from Device, or Threat from Assessment, etc.
The specialised elements would just have a different icon and inherit all relation rules from the parent one: this way there would be no portability issue (at least in theory) because a "vanilla" Archi would just show the default icon.

This is just a "pet project" I have in mind, and if I can make it happen I would gladly share it with the community (if there is any interest of course).

Thanks for your support.
zxxz

Jean-Baptiste Sarrodie

Hi,

What you describe is the same as the stereotype. The only difference being that you want different icon istead of the <<stereotype>> label. In Archi you can't do what you want because extending the model will not work the way you think: there will be no inheritance, so (e.g.) a Threat will not share allowed relationships with Assessment.

What would be more aligned with what you want would be to change the code responsible for drawing shapes and icons to draw custom icons depending on whether or not a property named stereotype exists. That's an approach that would not require any metamodel change but would have the effect you want. And in this case the model could be opened on a "vanilla" Archi without issues.

That's something we have in mind as part of a more profond redesign of the way figures are being drawn, so any help welcomed ;-)

Regards,

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

zxxz

Hello,

Indeed, rendering a different icon according to the value of a stereotype property seems a good idea  :D
Moreover, expanding on that, controlling how an element is rendered using property values would enable the notation proposed by Gerben and avoid a "multi-line" editor.

I would happily help, is there a dedicated area I can read to get up to speed with your reasoning?

zxxz

Jean-Baptiste Sarrodie

I think the first thing woujld be to read this issue : https://github.com/archimatetool/archi/issues/170

Then maybe share on this forum your ideas so that we could build the full vision.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

zxxz

cedepz already looked into the code, it looks promising!

I will follow the Developer Resources and explore the code next week.

Phil Beauvoir

I agree with JB. You could make additions to the code and re-compile but your app would be an island unless you distributed your version as well.

To support this kind of thing properly is not trivial and would require many additional "hooks" for the model and for UI behaviour, and a description of the extended metamodel that would ship with the model instance so it could be opened (icons, colours, metamodel beahviour, relationship rules, drawing code to draw the icons, etc, etc).

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

zxxz

Hello Phil,

JB suggested to start here : https://github.com/archimatetool/archi/issues/170

Do you have any additional info I can look at?

Thanks,
zxxz

ChampagnePerry

Hi,
Sorry if this is a bit late but I have a fairly detailed description of how to do this, can't post it today but I'll try to remember to do it tomorrow.

zxxz

Quote from: ChampagnePerry on April 12, 2017, 14:03:18 PM
Hi,
Sorry if this is a bit late but I have a fairly detailed description of how to do this, can't post it today but I'll try to remember to do it tomorrow.

Hello,

Any chance you could share your detailed description  8) ?

Thanks!

Hervé

I am also very interested on extending the model for technical elements (differentiating physical servers, virtual servers, routers, firewalls, san storage, and so on ...).

The eclipse framework allows to override classes, especially factories (i already use this functionality in my database plugin). I haven't looked at this part in detail yet, but the icons are managed by UIProvider classes that expose a getImage() method. As those classes are factories, they should be easily overridden to get the icon from a property.

If this is developed through a plugin, then people who will have the plugin will see the new icon. People who do not have the plugin will see the standard icon. I personally like plugins because it is much easier to maintain rather than forking the whole Archi code.

I'm available to discuss this further if you wish.

Best regards
Hervé

Koos

+1

My use case is detailing a system architecture with a messaging model. If you want to do it the proper way, the de-facto standard is to use the Enterprise Integration Patterns from Gregor Hohpe (here and here). I think EIP would make a great addition to system architecture models.

The actual question on EIP in Archi has been asked already separately, but I think it's great value adder, and worth mentioning once more.

And ofcourse, as a Linux user I have nowhere else to go ;-(

Lastly: Enterprise Architect has an add-on for EIP.

Koos