Tuesday, 23 July 2024 10:00

Extending the ArchiMate metamodel in Enterprise Architect

Written by
Rate this item
(4 votes)

Introduction

ArchiMate is an open standard for modeling enterprise architecture. ArchiMate is a modeling language and has a close relationship with the architectural framework Togaf. This combination means that ArchiMate has been introduced by many organizations, both commercial, non-profit and government institutions in the Netherlands and other countries. In addition, ArchiMate modeling is powerfully supported in Sparx Enterprise Architect.

In this article we discuss expanding the ArchiMate modeling language. Not for introducing new concepts but by adding properties to elements and relationships in the language. This is part of the metamodel in ArchiMate open standard and offers organizations the opportunity to register c features of the organization-specific enterprise architecture in close connection with the concepts in the language.

ArchiMate metamodel

ArchiMate is a rich modeling language with about sixty elements and twelve relationships. This makes it possible to model all aspects of an organization and its environment. In some situations, ArchiMate is seen as too rich for specific goals and target groups. ArchiMate has also introduced a mechanism for this and described it in detail. Namely views and viewpoints.

metamodel

Image metamodel

This means that ArchiMate's metamodel closely matches the needs of many organizations, ranging from just the open standard to making extensions in the language for the benefit of their own organizational needs.

ArchiMate in Enterprise Architect

Enterprise Architect supports multiple modeling languages such as UML, BPMN, BABoK. ArchiMate is also well supported in Enterprise Architect. In addition, more and more mechanisms of the ArchiMate language have been implemented. This includes extensions in addition to the ArchiMate diagrams such as the toolbox, working method for the ArchiMate viewpoints and the option to view viewpoints using the model wizard and then generate an initial view based on the viewpoint.

viewpoint

Image ArchiMate in EA

Since version 16 of Enterprise Architect, it has also been easy to restrict the metamodel for elements and relationships. This makes it possible to limit the language in elements, relationships, diagrams and quick linkers for certain user groups. A nice functionality for organizations that want to use a limited set of the ArchiMate language to simplify the language for the various stakeholders.

ArchiMate also describes expanding the language with properties. If you want to make organization-specific extensions, that is possible. There are also functionalities available in Enterprise Architect that support this. The MDG technology builder in particular has the option to expand the language with elements and relationships with their own properties. This allows you to introduce your own modeling language. In itself a powerful functionality, but also with a major disadvantage. You introduce a new modeling language based on ArchiMate, but IN ADDITION to ArchiMate. In many situations this is not desirable.

In this article I will therefore introduce a method that makes it possible to introduce organization-specific properties within the ArchiMate language without creating a new modeling language. For this we use an example based on the description available on the website with the ArchiMate standard (see the useful links below).

Combine functionalities in Enterprise Architect

As mentioned, you can use the MDG Technology builder to expand the metamodel for a language. This functionality uses the Tagged Values concept in the background. This functionality makes it possible to extend the Enterprise Architect data model.

To expand the ArchiMate language, we can suffice with the use of Tagged Values. The description of the ArchiMate language does mention specializations of concepts. However, if we look at the description, we see that no new mutual connections arise. New specializations can therefore be developed using Tagged Values.

You can elaborate these Tagged Values within the UML types, but they can also be used for ArchiMate. What is powerful is that a script can be defined for a Tagged Value. This allows us to set additional behavior and conditions for the different Tagged Values. In the image below you see the screen where you can define the Tagged Values in combination with the result in the tags of an element. I'll use a simple naming convention here. The name of the Tagged Values all start with ArchiMate. I will come back to this later.

taggedvalue

Image: Tagged Values

We can now easily expand the model based on the stereotypes and the tagged values without having to introduce new stereotypes. This means that the ArchiMate metamodel remains available unchanged and we can continue to exchange ArchiMate models based on the AMEF exchange format.

However, there is a functionality missing that makes the modeler’s life easy. A bottleneck with the tagged values is that the tagged values have to be added manually via the property screen. This is repetitive and slowing down when working with your own tagged values.

Fortunately, there is something that can be done about that. In Sparx Enterprise Architect you can catch events that occur in Enterprise Architect via a (model-based) add-in. This also applies to a context changed event. This means that if the context changes to another element or another connector, a command is executed. You can then use the Enterprise Architect API to check whether all tagged values are present for a certain stereotype and, if not, create these tagged values for the element or connector.

This functionality has been realized in the IDEA Add-on. In the settings of the IDEA addon you can prefix which tagged values should be created. In our case this is ArchiMate as a prefix, then the IDEA addon is used based on the handling of an event in EA. In the image below you can see the piece of software that underlies this within the IDEA AddOn. If you want to create a model-based add-in yourself, you can do so based on the code in the example below.

Public Shared Function DefaultTaggedValues(Element As EA.Element, _

 Repository As EA.Repository) As Boolean

           Dim Tag, oTV As EA.TaggedValue

           Dim oDef As New IDEADefinitions()

           Dim Prefix As String

           Dim oPT As EA.PropertyType

           Dim strPTTag As String

           Dim strNames As String = ";"

           Try

               Prefix = oDef.GetSettingValue("TaggedValuePrefix")

               If Prefix.Length > 0 Then

                   For Each oTV In Element.TaggedValues

                       strNames += oTV.Name + ";"

                   Next

                   For Each oPT In Repository.PropertyTypes

                       Dim blnCreateTag As Boolean = False

                       strPTTag = oPT.Tag.ToString()

                       If strNames.Contains(strPTTag) Then

                           blnCreateTag = False

                       Else

                           If strPTTag.Contains(Prefix) Then

If oPT.Detail.ToString().Contains("BaseStereotype") = False And _             Element.Stereotype.Length > 0 Then

                                   blnCreateTag = True

                               End If

                               If (oPT.Detail.ToString().Contains("BaseStereotype") And _

                                    oPT.Detail.ToString().ToUpper().Contains(Element.Stereotype.ToUpper())) Then

                                   blnCreateTag = True

                               End If

                               If oPT.Detail.ToString().Contains("AppliesTo=" + Element.Type) Then

                                   blnCreateTag = True

                               End If

                               If blnCreateTag Then

                                   Tag = Element.TaggedValues.AddNew(oPT.Tag, "")

                                   Tag.Update()

                               End If

                           End If

                       End If

                   Next

                   Element.Update()

                   Return True

               Else

                   Return False

               End If

           Catch ex As Exception

               DLA2EAHelper.Error2Log(ex)

           End Try

           Return False

End Function

Source code

I have created an example for the combination of the tagged values and the IDEA, including a short video on how this can be achieved.

Summary

This whitepaper describes how you can extend the ArchiMate metamodel with properties. In Sparx Enterprise Architect this is possible with the tagged value functionality. In addition, the IDEA AddOn describes how repetitive and slow work for the modeler can be automated. With this we introduce a powerful method to extend the ArchIMate metamodel without having to introduce new stereotypes into the model. Particularly for organizations that see working based on open standards as an important requirement.

Useful Links

Read 603 times Last modified on Wednesday, 24 July 2024 22:32
Bert Dingemans

I am an independent (data) architect and EA consultant working often with enterprise architect mostly for UML class diagrams and ArchiMate 2.0. I am using enterprise architect for  generating documentation, XSD files and modelling enterprise architectures with ArchiMate 2.0. I have developed an Open Source Web Publication Platform for EA.  I also participate in Eaxpertise.nl. You can reach me at [email protected]

eaxpertise.nl

2 comments

  • Comment Link Bert Dingemans Friday, 08 November 2024 08:26 posted by Bert Dingemans

    Thank you Guillaume, I understand your approach. Another option is using a model based script as you also apply in your duplication approach. Sparx is offering multipe paths in solving a problem luckily;-)

  • Comment Link Guillaume Thursday, 12 September 2024 08:59 posted by Guillaume

    Interesting approach, thank you for sharing it Bert.
    In most, if not all cases, I set up an MDG technology to provide users with the selection of ArchiMate concepts & relations, custom tagged values, quicklinker definitions, toolboxes, and searches. Stereotypes alongside the metatype property can be used to change ArchiMate vocabulary to suit specific needs.
    I can however see you point on keeping an unchanged ArchiMate model (no stereotype), should there be other tools that require exchanging the model via supported formats.

Login to post comments