Bert Dingemans

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 You can reach me at

Duplicatevalidation in Enterprise Architect 



This article is an example of using Enterprise Architect in a team. In our team of four architects we use Enterprise Architect for modelling the enterprise architecture in ArchiMate 2.0. For this government agency with approximately 1200 employees there is a large repository of architectural elements, building blocks and diagrams. 

Because we maintain this repository with four architects a number of challenges arise: 

  • Everybody uses the same definition of elements and concepts 

  • The repository structure is managed by one authorized team-member (the custodian)  

  • There is agreement about the architecture process and products 

These activities are embedded in the team structure and process and gives us the opportunity to cooperate in producing our architect documents and products. However one problem is hard to solve: the duplication of architecture elements. This article introduces a solution based on a automation extension for Enterprise Architect. 

The problem 

The repository in our organisation has around 2000 ArchiMate elements stored in a relational database. The repository explorer has therefor a tree-structure with multiple layers and multiple entrypoints. For creating a model and the containing elements these is a description of an architecture modelling process, see the paragraph below. However this process is not always followed. 

This causes a problem of duplication of elements. In the figure below we see an example of this problem. There are three architects that created a model for their one document or project and they did not validate the repository for existence of the elements. This causes that there are elements with the same characteristics in the repository 


Figure: Duplication problem 

This duplication problem has a number of disadvantages like: 

  • Associations of elements with other elements and diagrams are incomplete 

  • Documentation and notes are scattered over the duplicated elements 

  • Future use of elements can cause further inconsistencies and duplications 

  • Merging of duplicated elements is a time-consuming activity   

Therefor we search for a solution to tackle this problem based on the automation model of Enterprise Architect 

The modellingprocess 

The modelling process has a number of steps based on the structure of the user interface in Enterprise Architect. In the figure below you can see the steps of this process in an ArchiMate notation. The steps in the figure is the correct process and it includes a step to check for existence of each element in the repository before creating it. 


Figure Correct modelling process 

Unfortunately this correct process has an extra step which is easily forgotten when the model is created. For example in an interactive workshop with the stakeholders, the validation step is time-consuming for the architect and therefor forgotten. In the figure below you see the incomplete process.  


Figure Incomplete modelling process 

A repository which is based on an incomplete modelling process will slowly be polluted with duplicate elements and is therefor harder to maintain and use for future diagrams. To reduce this risk the following solution is introduced. 

The solution 

The solution is an automation extension developed in VB.Net and attached to Enterprise Architect as an extension. There are a number of entries available: 

  • After creating or modifying an element in the repository the element properties like stereotype and name are validated for existence in the repository. When this is the case the user gets a warning. 

In a diagram or in a package in the explorer the extension menu has an extra option for validating all the elements in the diagram or packages. When there are duplicated elements these are displayed in a overview dialog window. 

In the figure below you see an example of the validation screen. When an element is visible in this screen it has one or more duplicates 


Figure: Duplicate screen 

Implementation of the extension 

For the implementation of the extension I used the examples on the website of Sparx. Furthermore the article of Geert Bellekens was of great value see 

Unfortunalety I am a developer older than fourty and therefore experienced in VB.Net and less in C#. Howeverthere is a web converterfor C# and VB.Net that is of great assistance in this situation. See  for more information.  

The source code of the extension is divided in threesections: 

  • Handling the events 

  • Do the validation checks 

  • Display warnings or lists of elements 


The first section is an implemention three events of the mentioned examples. The second section is of more interest and a codesnippet is given below: 

 Private Function CheckUniqueElement(oElement As EA.Element,_ 

 oRepo As EA.Repository) As Boolean 
Dim sSql As String 
If oElement.Stereotype.Length > 0 Then 
sSql = "SELECT Count(*) as aantal FROM t_object  

WHERE = '#name#' AND t_object.Stereotype='#stereotype#'  

AND t_object.ea_guid<>'#guid#' " 
sSql = Replace(sSql, "#name#", oElement.Name) 
sSql = Replace(sSql, "#stereotype#", oElement.Stereotype) 
sSql = Replace(sSql, "#guid#", oElement.ElementGUID) 
   strVal As String 
   strVal = oRepo.SQLQuery(sSql) 
   Return strVal.Contains("<aantal>0</aantal>") 
End If 
Return True 
End Function 

In the codesnippet a simple check is made based on a SQL statement. This statement checks for duplication on name and stereotype of the element. For ArchiMate this is sufficient, possibly for other notations another combination of attributes is necessary. 

Another part of the validation section is looping through the collection of elements in a package or  diagram. The code below shows the example of the diagram function: 

If Location.ToUpper() = "DIAGRAM" Then 
 Dim oElement As EA.Element 
 Dim oDiagramObject As EA.DiagramObject 
 For EachoDiagramObject In _ 

  oElement = Repository.GetElementByID(oDiagramObject.ElementID) 
 If Me.CheckUniqueElement(oElement, Repository) = FalseThen 
  End If 
End If 

The last section of the display on the screen of the validation results is handled. In the source code files of the download you can find the example.  

Using the extension 

This extension is developed as a solution in Visual Studio Express. The solution is available in a zip file and can be downloaded from 

When you compile the solution in Visual Studio it is automatically registered for automation usage in the registry. For deployment without Visual Studio you have to use regasm.exe. Make sure that you use the correct version of regasm.exe, especially when you have multiple versions of the DotNet framework on your environment. 

The DLL is available in the BIN/Release folder and is compiled under DotNet 4.0. Furthermore you have to make a registry entry with regedit under the EA AddIns The value that you have to add points to the entry class in the DLL. The value is:DLA2EA.DLA2EAAddIn. 

The extension is at the moment still limited in functionality. In our organisation we are thinking about a number of extra functions like merging elements to one element based on the attributes of elements or via a user interface.



In the last year I have done a number of projects for a Dutch government agency as a data architect. This organisation has an architecture team with four members. There is a problem in producing architecture documents like Project Start Architectures, it takes too much time and the result has limited value for the projects.  This is mainly caused by the lack of overview on the baseline and the target architecture. There is no overview of the business processes, the application and the infrastructure.

For every project, an architect has to do a lot of research on the baseline architecture first, sometimes this activity takes weeks to get a architecture view that is input for working on the target architecture. Another problem is that every architect has his own tools and techniques for the architecture notations and documents. Although there is an architecture document template, there are large differences in the quality and presentation of these documents. However due to the differences in tools and techniques, every architect starts from scratch for every project.

To tackle these problems the team decided to synchronize their activities, techniques, notation and tools. Therefore the following questions where formulated:

·         Which notation is best to support our architecture documents and diagrams?

·         Based on the selected notation, which tool can help us to make our documents more efficiently?

·         What do we have to change in our team to encourage reuse of existing documents and diagrams?

Below I will describe how we looked for answers to these questions and what lessons we have learned.



In the Netherlands, there are a lot of architecture methods available like Togaf, Zachman, Dragon1, Demo, DyA and ArchiMate.  Each method has its own characteristics. However which are important for our own organisation. The architecture team did an interactive workshop to formulate the following requirements for the architecture methodology:

·         It must be an open standard and is used in other government agencies for exchanging models.

·         Applicable for all aspects of an enterprise architecture, from business to infrastructure and data architecture.

·         It must be easy to use and easy to read for non IT professionals.

In this interactive workshop a number of extra requirements where formulated and most important we defined a multiplier define the importance for each requirement. The requirements were mapped on a number of architecture methodologies and ArchiMate was the methodology with the highest score.

ArchiMate is an open standard with a powerful notation for all the aspects of enterprise architecture. Since ArchiMate 2.0 there are even extensions for motivation like principles, requirements and stakeholders and project management for plateaus, gaps and work packages. In the figure below you see a sample ArchiMate 2.0 diagram.

Figure 1 Sample ArchiMate notation

After this methodology selection the next step was to evaluate it in a number of projects. For ArchiMate there are Visio Stencils and a number of open source tools. Every architect used the notation for a period of time and during this period we organized a number of sessions to discuss the results. We also organized an interactive session with our non IT stakeholders to evaluate the selected methodology.

In these evaluations we discovered that the ArchiMate notation is valuable for describing the architecture in our organisation. For the notation instruction material was made with example diagrams and describing when to use what ArchiMate viewpoints. However the notation is too rich for most of the situations. So the following categories were introduced:

·         Primary diagrams, should be present in every architecture document

·         Secondary diagrams, only available in complex documents for extra description

During the evaluations it became clear that the Visio stencils and open source tooling had insufficient functionality for the next phase, the implementation of the methodology.

Using Enterprise Architect

Like we did with the notation we formulated a number of requirements including a multiplier for each architect and compared a number of tools with each other. This was done with a simple spreadsheet. In the figure below a part of the spreadsheet

Figure 2: Requirement-Tool matrix

Based on the results of this matrix Enterprise Architect had the best score and we introduced the product. This introduction was done in a number of planned steps. There was a risk that the organisation returned to old habits of working in an unstructured way and introducing a architecture methodology combined with tooling has to be embedded in all the activities of the architects.

In the following sessions I will describe a number of important aspects for introducing Enterprise Architect with ArchiMate.


Repository setup

Already in an early phase of the tool introduction we discovered that the repository content can become messy when you do not think about structuring the elements. Although there is a good project browser search function structuring the project so you can browse for elements is a good aid for the users of the system.

The repository is divided in three sections:

·         Projects,  actual project documents in various stages of completion

·         Reference architecture, elements and diagrams from previous projects that are generic and probably reusable in future projects. This section is subcategorized in a structured manner comparable with the ArchiMate layers and columns

·         Archive, diagrams and elements from projects that are probably not reusable.

Figure 3: Repository setup

Document generation

Introducing an architecture methodology in combination with tooling asks a lot of effort from the involved professionals. It was therefore important to seek for a solution to reduce the production time of the architecture documents, this was the reason why we started this project in the first place.

Already in an early phase of the project document generation was investigated as part of the overall solution. Document generation proved to be a great help to achieve this goal. The standard document templates were changed to our own corporate layout and the layout of the elements was changed for a better readability. The repository setup was changed so it was possible to change ordering and exclude packages from the document generation.

Sharepoint Wiki

In the organisation Microsoft SharePoint is the application for team- and project collaboration. The architecture team used this already and has made a lot of information available in a SharePoint wiki. First approach was to transfer this information to Enterprise Architect. However making links to files and Wiki content from the Enterprise Architect packages and elements turned out to be a good solution. With the links from the screens and the generated documentation to the wiki content people can easily get access to background information.


In the repository setup a distinct difference is made to project data and generic data of the reference architecture. Especially this reference architecture is an important aspect of introducing standardization and reusability. Therefore the reference architecture needs special governance. The team decided to introduce a custiodian role. This custodian is responsible for the reference architecture package in the repository. To keep this reference architecture up to date the custodian has the following activities:

·         Give information and instructions to team members about the setup of the reference architecture and how to use the elements and diagrams.

·         Give feedback on diagrams and notation made by team members in project documentation.

·         Select generic diagrams and elements from project documentation for transfer to the reference architecture.

This custodian role turned out to be a very good decision to help introduce the ArchiMate notation, the new methodology and the usage of the tooling in a right manner.  

Lessons Learned

In one year the organisation introduced a new architecture methodology, notation and tooling. Furthermore the production of architecture documents changed dramatically. Some aspects were successful, while others werenot. The most important lessons we learned are

·         Team involvement,  this is most important to make this a success. Every team member must see the advantages of the new methodology. Furthermore, everybody must be an ambassador and therefore should have sufficient influence on the final product.

·         Notation governance, especially in projects under time pressure, it is so tempting to make an simple diagram in Visio or PowerPoint for a few team members. The role of the custodian is in this important to keep everybody involved!

·         Communicate! A new architecture methodology, notation and tooling has a great impact, not only for the team members but for every stakeholder in the organisation. Take care of informing everybody about results, products and other notifications. We made a number of posters of architecture diagrams for important projects and that helped a lot (see figure 4)

·         ArchiMate 1 and 2, there are two versions of ArchiMate in notation and in Enterprise Architect. At first we decided that we used these notation together. This turned out to be a wrong decision. Not only was it confusing, the tooling has strange behaviour when using the versions simultaneous.


Figure 4 Project Poster


The introduction of ArchiMate in combination with tooling was not always easy. There are a lot of options and it was difficult to make the right choice, especially for the methodology. Introducing a new working proceedure was not simple for evberybody. The custodian role helped a lot here. Enterprise Architect in combination with ArchiMate 2.0 turned out to be a good choice. The tooling is easy to use, has sufficient search capabilities, can be adapted easily for document generation and connection with existing applications like SharePoint.



Page 3 of 3