Enterprise Architect version 14.0

download
purchase

enzh-CNcsnlfrdehiiditkoplptruskessv

My Profile

Social Media Channels

facebook google plus twitter youtube linkedin

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 Eaxpertise.nl. You can reach me at bert@interactory.nl

Dutch Sparx Enterprise Architect Event

Utrecht, The Netherlands

27 & 28 September 2018

Are you an Enterprise Architect, Software Designer, Business Analyst or Business Process Analyst? Do you use Sparx Systems Enterprise Architect? Are you interested in two days full of information exchange on the usage of Sparx Systems Enterprise Architect.

For example, on subjects like:

  • Modelling languages like SysML and ArchiMate
  • Use Cases and best practices of Architectures and modelling in EA,
  • Extensions like MDGs in and for EA.
  • Various modelling techniques like real-time and data modelling,

Then you should not miss this EA Usergroup event at Utrecht on 27 and 28 September 2018. 

At this event EAUG we will offer a day with training and in-depth sessions (a session lasts more than three hours). This will be at 27 September 2018. 

The second day is 28 September 2018 with is a regular event with sessions of 45 minutes. We will offer three tracks:

  • Modelling experiences in EA
  • How-to (changing the functionality of EA or use extensions)
  • EA@ (use cases of EA in various organisations)

Register now for the Dutch EA Usergroup event via http://eaxpertise.nl/eaugregistration.aspx

Register before 1 August and you get an Early Bird Discount

Thursday, 21 June 2018 14:05

Integrated Data Entity Architecture in EA

Introduction

IDEA is an abbreviation for Integrated Data Entity Architecture. It is a methodology and an implementation in Sparx Enterprise Architect to create an integrated architecture based on the following layers

  • Physical data modeling for a technical modeling that includes specific implementation concepts like columns and constraints
  • Logical data modeling a detailed implementation independent model for entities, attributes and assocations
  • Conceptual modeling for a business view on data and business entities including the connections to the application landscape and business processes
  • Data Management modeling for modeling data governance, ownership, privacy and security and data qualities.

Navigation screen WPP

Navigationscreen for the Web Publication Platform of the IDEA project

The IDEA website offers a number of products and solutions the most important are:

  • Viewpoints, these describe how the concepts and associations are used within one of the above mentioned layers
  • Example data model an example project of a datamodel to display the various layer concepts and the implementation
  • Example data management, displaying the concepts for modeling data management aspects
  • Scripts and Addons for Sparx, various zips with scripts and a dll, you have to register as a community member (see below)

Community

The IDEA elements like the viewpoints and scripts etc are developed based on Open Source and a community. This means that the community is a group of organisations and people who benefit from the developed products. They can therefore do suggestions for new functionalities.


Everybody can become a passive member of the community. This means that you only have to register at this website and after that you receive an email with a link to all the downloads.

  • Active members have the possibility to define functionalities and based on their requirements and input extra material is developed. Based on there requests a sponsor pays for the development costs. Advantage for active members is that they define the functionalities but share the development costs. When you want to become an active member please contact us via the contact page.

Sample screen of the IDEA mapper

Sample screen of the IDEA Mapper 

Products of the IDEA framework

The IDEA framework is based on a number of steps and layers. These are described in viewpoints (like in ArchiMate). However one of the main aspects of the framework is that it is supported by a number of components and scripts within Sparx Enterprise Architect. Below you find the most important products available:

  • Viewpoints model, implemented in an EAP file and available for download as a zip file but also in the WPP version of the IDEA framework via a viewpoint webpage
  • Sample layered data model baded on the four layers of the model. It is implemented in a repository for download and in the WPP version of the IDEA framework via a sample model webpage
  • Script module, repository for download with numerous scripts for generating layers in the model, modifying diagrams, creating mappings and helper scripts to make the work of a data modeller in a layered approach more easy. Sample scripts caan be downloaded after registration as community member
  • IDEA AddOn based on a DLL with numerous routines, forms and classes for generating layers in the model, modifying diagrams, creating mappings and helper routines to make the work of a data modeller in a layered approach more easy. Sample scripts caan be downloaded after registration as community member
  • IDEA MDG with the notations of the four layers implemented in toolboxes, diagrams, search routines and a modelview the work of a data modeller in a layered approach more easy. The MDG can be downloaded after registration as community member
  • Webvideo with an introduction to the modelling functionality in the IDEA framework. The video is available via the EAxpertise channel in Youtube

More information is available via the other startpages and via http://eaxpertise.nl 

Overview of mappings

 

EAUG2018 in Utrecht

As proficient Enterprise Architect user we like to contact you about the Enterprise Architect User Conferences in Utrecht on the 27th and 28th of September 2018. This two days event will be a training day (Thursday 27 september) where in depth sessions of three and a half hour are offered.

The Friday (28 september) will be a regular conference with sessions of 45 minutes in the tracks EA@, modelling and HowTo.

Currently we are collecting the session abstracts and speaker bios since the event is direct after summer holidays so early action for a full and interesting agenda is required.

We would like to invite you to do your proposal via the following url: http://eaxpertise.nl/eaugproposal.aspx. When you fill in your email address in the first step you can fill in your bio and photo (the first time) and add one or more session abstracts. Of course you can also send your information to the email address below.

We would be happy to hear from you, for questions and remarks please contact by email This email address is being protected from spambots. You need JavaScript enabled to view it. or phone (Bert) at +31.6.36431652. 

More information about this two day event can be found at: http://eaxpertise.nl/eaug2018.aspx 

We hope to welcome you in Utrecht at 27 or 28 september!

In September there will be a user group conference in the Netherlands. It will be a two day conference:

  • 27th of september will be a meeting with a limited number of in depth sessions (three hours per session) given by recognized Sparx trainers and specialists
  • 28th of september a "tradional" user group with three tracks of sessions about use cases, experiences on modeling, reporting and repository usage. This day will have two keynotes of generic Sparx related subjects.

The conference will take place close to the central raiway station of Utrecht in the Netherlands so it is very well reachable by train and car.

More details about speakers, sessions and other participant relevant subjects will be published via the regular communication channels and via a specific landing page (which is currently developed and will be avialable via http://eaxpertise.nl ).

We hope to meet you in september in Utrecht!

The Open source Web Publication Platform has a new release, there are a number of new and updated features:

  

    • New an responsive layout of the application so the website can be viewed with tablets and mobile devices
    • Improved Matrix view
    • Navigation in diagrams with navigation cells
    • Improved form factory explorer.
    • Adapted discussion and response module
    • Version for MS-SQL repositories and Form Factory database platform.

In the image below you get an idea of the new layout

 width=

The product is again available as Open Source Platform and can be downloaded by registered users of the Web Publication Platform. Registration is easy by introducing your name and email address. Also the service and cooperation model is adapted to support the community in contributing and collecting new requirements and functionalities.

When you want to take a look at the online demo version please visit http://wpp.eaxpertise.nl. Interested in downloading the material (sample project) please visit the registration and download page

Introduction

Currently I am involved in a number of projects where Sparx Systems Enterprise Architect is introduced as a central repository for large architectural teams. EA is a great tool for that and supports a team approach very well with various functionalities. Especially the Project Browser, the Search functions (see for example http://eaxpertise.nl/CMSForm.aspx?webpage=archisearch) and the Toolbox setup are well suitable in large projects. 

Occasionally, large teams that are not using a formal methodology may introduce duplicate elements, with a corresponding risk for introducing an inconsistent model within the repository. For one of my customers, this was the reason to look for a new approach that reduces the risks of duplicates at the start and not by deduplicating the elements (see http://eaxpertise.nl/CMSForm.aspx?webpage=TEA )

Process steps

This approach has the following steps:

  • Open an existing diagram or a new diagram for one of the ArchiMate viewpoints
  • Select which (ArchiMate) element type you want to select
  • Search in the repository for the presence of this element
  • If so add the element to the diagram and extend the model in your diagram
  • If not add a new element to the diagram and fill in the element details via the Dialog windows

A relatively simple process but due to the various screens in EA supporting these steps architects are often not willing to take all the steps and add a new element from the toolbox right away.

ArchiMAID

Because of this we decided to extend the already available Deduplication AddOn with an ArchiMAID window. This window makes it possible to do all the above mentioned process steps in a simple (wizard like) process supporting screen. The window has the following steps:

ArchiMate

This screen gives an overview of all the aspects views of ArchiMate (mostly an architect knows from which aspect he or she wants to add an element). Based on the selection in this first step the second step is displayed in which you can select one or more ArchiMate concepts to do a search on (or display them all in the search result screen). See the picture below.

When you find one or more elements in the search result grid a the bottom of the screen you can select these elements and then press the Add 2 Diagram button. The selected elements are then displayed in the active diagram. When the architect can not find any element relevant for the diagram he or she can then add an element to the repository . This is available in the last tab of the screen and has the following visual representation.

The name of the new element, the stereotype and the notes are filled in and the Create on Diagram button is pressed. This creates the element in the repository and on the diagram. For the initial implementation of ArchiMate elements these attributes are sufficient.

More information and download

This extension of the functionality is availabe in the open source extension for EA that is available via the the link where this add on is described in detail. Go therefore to the download page of TEA.

Please feel free to use this function in your own situation, when you want extensions on this you can contact us via the eaxpertise website. When you make extensions by yourself we encourage you to share this with us.

See also

Saturday, 25 November 2017 06:00

ArchiMate Search helper in EA

Introduction

One of the challenges of a teambased architecture repository based on the ArchiMate language is to reduce the number of duplicate entities. With duplicates I mean an Archimate concept with the same name and stereotype that has two or more instances in the repository.

Especially in large repositories with a complex project browser configuration and a large number of modellers the changes of duplicates are substantial. Therefore mostly a procedure is introduced based on the steps that a modeller has to do a repository search before he or she can actually add an element from the toolbox and modify it

Search

For searching for elements in the repository there is a search dialog availabe that opens by default in a simple common search that searches for a text in all the items. This works fine but has a number of limitations for an ArchiMate modeller:

  • The search is relatively slow
  • The modeller is not interested in the full content but only in ArchiMate elements of a specific type.

Luckily we can define our own searches in EA and an example of a ArchiMate specific search is shown bin the image below:

In this image you see that we can search for application components only and the list is by default sorted by objectname. This will help us in a later stage in user friendliness. The SQL statement is given below.

 

SELECT t_object.ea_guid AS CLASSGUID, t_object.name as ObjectName, t_object.Stereotype, ParentPkg.Name as ParentName, t_object.ModifiedDate, t_object.Author, t_object.[Version], t_object.[Alias], t_object.Object_Type as CLASSTYPE,t_object.Note as Notes FROM t_object, t_package as ParentPkg WHERE (t_object.name LIKE '#WC#[Search Term]#WC#' OR '[Search Term]'='') AND t_object.stereotype IN('ArchiMate_ApplicationComponent') AND t_object.Package_ID = ParentPkg.Package_ID ORDER BY t_object.Name

The trick is in two parts of the select statement:

  • The first one is that we filter on the stereotype of the element so we only see a limited number of elements based on that stereotype
  • The second is that we do a trick with the search term. We combine a search term search with a full search so you can see all the elements when the search term is empty

Model view

 

This helps us a lot in finding the relevant elements relatively fast however the search screen has a number of limitations in which selecting all the time the right query is relatively user unfriendly. However luckily Enterprise Architect has another screen for implementing this user friendly approach in a convenient way: the model view.

In the modelview you can define your own search view and link these views to a search in the search component of EA. See the picture below

In this screen you see a sample of a number of ArchiMate specific searches based on their stereotype. When you expand one of these searches you get the list of elements based on this stereotype. Since we have a combination of a keyword search and a full search (on the stereotype) the modeller can select the approach that best fits his needs. In the view you can select an element by typing in the first characters another option is to open the conext menu and go to the search function in EA and now we open the richt search immediately.

Download

For download of this solution or for downloading other scripts or add ons please visit the eaxpertise website.

Would you like to contribute to a worthwhile day of sharing knowledge and techniques around the use of Sparx Enterprise Architect?
Whether you wish to talk about user experiences tools, methodologies and/or your experiences in this field, you are welcome to present your (non commercial) ideas on June 10th at the Dutch Enterprise Architect User Group event.
At this event EAUG we will offer three tracks:
• Modelling experiences in EA
• Howto (changing the functionality of EA or use extensions)
• EA@ (use cases of EA in various organisations)

Do you want more information please contact us via: This email address is being protected from spambots. You need JavaScript enabled to view it. or visit the Enterprise Architect User Group website for more details.

Wednesday, 02 September 2015 12:28

A web publication platform for an ArchiMate model

A web publication platform for an ArchiMate model

 

Introduction

As an independent Enterprise Architect (EA) consultant I often get the question what the possibilities are for publishing the repository content over the web. Of course in EA there is the possibility to generate a HTML version of the model but in most cases my customers demand extra functionality like key word search or a discussion module.

In my current assignment for the National Health Broker in The Netherlands the introduction of a webbased solution was evident. One of the most important product of this organisation is the architectural documentation of the interfaces of the broker component. The organisation itself is quite small but the external stakeholders like software suppliers, software developers and policy makers is large.

In the current situation the architectural documentation is published in pdf documents. Keeping these documents up to date and correctly linked and integrated with each other is a tedious job. Introduction of an Architecture Repository based on ArchiMate 2.0 and EA helped us a lot. The web-based solution  is however an essential part of the solution. This article describes solution we introduced: the Web Publication Platform.

Implementation model

Because the current solution is the implementation of an ArchiMate 2.0 architecture model we use limited data entities from the EA repository. The model is  rather large, over 3500 elements and 5000 associations. In the image below the most important elements are displayed and described.

Archimate data objects

·         Packages are extensively used for grouping and sorting elements and diagrams

·         Diagrams are used for given summary views of the entities to various stakeholders

·         Elements are used to describe the architectural entities. Therefore we use the notes, alias, key word attributes and extra entities which are mentioned below

·         Associations for modelling the associations between the elements

·         Attributes for data modelling in data objects and artficats within ArchiMate (this is an extension on the methodology)

·         Tagged values for extra describing attributes of the elements

·         Linked files, because the broker has to keep track of legislation and standardisation constraints which are maintained by other organisations hyperlinks to webpages are essential.

For the implementation of the WPP we decided to use an Open Source Framework for content and form management. It is unnecessary to start from scratch developing a solution. Not only implementing the forms for the architecture repository the form factory solution has a web based interface for the governance of its own (form) entities.  In the image below an overview of the functionality

Archimate functions

The form factory has various form types that can be used to display information from a relational database. Since the EA repository is also a relational database the interface to the database is implemented in a number of SQL statements and are connected to a form type. The Form Factory engine now handles the request made by the user when using the web application.  The views are summarized below:

·         Lists and sublists are used to display multiple elements in a screen and make selections to display in detail views

·         Detail views to display elements and diagrams including links to associations, attributes and tagged values etc.

·         Explorer view is a combination of a tree view and a detail view

·         Discussion platform for adding comments to elements by authorized stakeholders

·         Search, for key words in combination with a number of filter options

In the image below a sample of an explorer view screen

Screenshot

 

Some challenges

When implementing the interface to the repository we faced a number of difficulties. We used two architecture principles that limited our options:

·         All governance modelling and administrative activies are done by architects via the desktop application of Sparx. The WPP is only used for publication of the information not for modification.

·         There are no modifications made to the EA database (eap file). Therefore no tables for the form factory component are implemented in this database.

Below a number of specific challenges are briefly described

Configuring the Form Management System

Because of the second principle we faced the problem that in one detail screen (for example the element detail) we have to display information from two databases in one screen. The Form Factory was not configured for this constraint. Therefore we introduced an abstract class where the sql statements are combined with a connection string so before the sql statement is executed to retrieve the data the connection to the right database is opened. In the code snippet below an

       Public Function Detail(entity As String, id As String) As String

            Dim strRet As String

            Dim strSql As String

 

            Select Case entity.ToUpper

                Case "ELEMENT"

                    Me.ViewerHtml("<H1>Details element</H1>")

                    Me.ViewerDetail("SELECT name as elementnaam, stereotype, note as toelichting, '<a href=FrmDetail.aspx?module=package&id=' & package_id & '>Module informatie</a>' as [module] FROM [t_object] WHERE [object_id]=" & id)

                    Dim strCon As String

                    strCon = "SELECT start_object_id, '<img src=images/' & t_object.stereotype & '.png >' as logo, connector_type as type, t_object.name as element FROM [t_connector], [t_object] WHERE [t_connector].start_object_id = t_object.object_id AND [end_object_id]=" & id

                    strCon += " UNION "

                    strCon += "SELECT end_object_id, '<img src=images/' & t_object.stereotype & '.png >' as logo, connector_type as type, t_object.name as element FROM [t_connector], [t_object] WHERE [t_connector].end_object_id = t_object.object_id AND [start_object_id]=" & id

                    strCon += " ORDER BY 2, 3 "

                    Me.ViewerList(strCon, "FrmDetail.aspx?module=element&id=", "<H2>Associaties</H2>")

                    Me.ViewerList("SELECT t_diagram.diagram_id, t_diagram.name as diagramnaam FROM [t_diagramobjects], [t_diagram] WHERE [t_diagramobjects].diagram_id = [t_diagram].diagram_id AND [t_diagramobjects].object_id=" & id & " ORDER BY 2 ", "FrmDetail.aspx?module=diagram&id=", "<H2>Weergegeven in diagrammen</H2>")

                    Me.ViewerList("SELECT object_id, filename as bestandsnaam, '<a target=_blank href=' & filename & ' >Open bestand</a>' as link FROM [t_objectfiles] WHERE [object_id]=" & id, "", "<H2>Gekoppelde bestanden</H2>")

                    Me.ViewerList("SELECT ID, name as naam, container as [afkomstig van], lowerbound as mincard, upperbound as maxcard, notes as toelichting FROM [t_attribute] WHERE [object_id]=" & id, "", "<H2>Attributen</H2>")

                    Me.ViewerList("SELECT propertyid, property as eigenschap, value as waarde, notes as toelichting FROM [t_objectproperties] WHERE property LIKE 'Vz%' AND [object_id]=" & id, "", "<H2>Extra items</H2>")

                    If ViewerFactoryHelper.IsDiscussieLid() Then

                        Me.ViewerList("SELECT ea_discussion_id, EA_DISCUSSION.datum, EA_DISCUSSION.onderwerp, EA_DISCUSSION.toelichting, '<a class=''ddbutton'' href=cmsForm.aspx?formid=50315&ea_discussion_id=' & ea_discussion_id & ' >Detail en Reageer</a>' as link FROM EA_DISCUSSION WHERE EA_DISCUSSION.element_id = " & id & " ORDER BY 1 DESC", "", "<h2>Gestarte discussies over dit element</h2>", ConfigurationManager.AppSettings("connectionstring"))

                        Me.ViewerHtml("<a class='ddbutton' href='cmsForm.aspx?formid=50301&element_id=" & id & "' >Start Nieuwe discussie over dit element</a><br>")

                    End If

                Case Else

                    MyBase.objSB.Append("Niet gevonden")

            End Select

            strRet = MyBase.objSB.ToString()

            Return strRet

        End Function

In the code you can see a number of statements in combination with a connectionstring. The sql statements are also very informative because it gives an idea of how the information is retrieved from the repository. The viewer functions like ViewerHTML are used to call the right formtype in the form factory engine.

Exporting diagrams

One of the powerful aspects of EA is the diagramming tool in combination with the relational database to store the information. Reason to re use the diagrams in the WPP, but how to export the diagram’s from EA to a file readable in a web application.

The automation or scripting interface of EA offered a solution that was easy to implement. We export all the diagrams to a png file in a certain folder on a disk and this folder is published over FTP to the implementation of the WPP application. The code to export the diagrams is given below (the script can also be found on the WPP website.

option explicit

 

!INC Local Scripts.EAConstants-VBScript

' WARNING Change this constant for your own Export Directory

public const DirName = "c:\testbert"

 

sub OnProjectBrowserScript()

               

                ' Get the type of element selected in the Project Browser

                dim treeSelectedType

                treeSelectedType = Repository.GetTreeSelectedItemType()

               

                ' Handling Code: Uncomment any types you wish this script to support

                ' NOTE: You can toggle comments on multiple lines that are currently

                ' selected with [CTRL]+[SHIFT]+[C].

                select case treeSelectedType

 

                               case otPackage

                                               ' Code for when a package is selected

                                               dim thePackage as EA.Package

                                               set thePackage = Repository.GetTreeSelectedObject()

                                               ExportDiagrams(thePackage)

                                               Session.Prompt "Diagrams exported to " & DirName, promptOK

                               case else

                                               ' Error message

                                               Session.Prompt "This script does not support items of this type.", promptOk

                end select

end sub

 

Sub ExportDiagrams(objPackage)

    Dim objProject as EA.Project

    Dim objDiagram as EA.Diagram

 

    set objProject = Repository.GetProjectInterface()

    For Each objDiagram In objPackage.Diagrams

        Repository.OpenDiagram(objDiagram.DiagramID)

        objProject.SaveDiagramImageToFile(DirName & "\" & objDiagram.DiagramID & ".png")

        Repository.CloseDiagram(objDiagram.DiagramID)

    Next

    Dim objChild

    For Each objChild In objPackage.Packages

        ExportDiagrams(objChild)

    Next

End Sub

OnProjectBrowserScript

The export diagram routine in the code does the job. We loop through a collection of diagrams in a package and each diagram is saved with the objProject.SaveDiagramImageToFile() method. The parameters and naming is connected to the naming convention in the WPP implementation.

The open source solution

For this WPP platform we decided to publish it as an Open Source Solution in the hope that a community of users will emerge to continue the development of this solution. This means that the code can be downloaded from the WPP website. This WPP website is by the way an example of a architecture repository view based on the form factory framework. It is actually a WPP publication of a sample repository in an eap file in combination with some extra information pages about the product.

More information

More information about the WPP is available at the WPP website: http://wpp.interactory.nl . Please subscribe to the community and use the material in your own situation. Also take part in the forums to report bugs or discuss new functionality. In the blog section I with regularly describe functionality etc. When you want to have more information about modelling in ArchiMate or the usage of architecture repository please contact me via the contact page of the wpp website.

Duplicatevalidation in Enterprise Architect 

 

Introduction 

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 

Afbeelding 

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. 

Afbeelding 

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.  

Afbeelding 

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 

Afbeelding 

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 http://bellekens.com/2011/01/29/tutorial-create-your-first-c-enterprise-architect-addin-in-10-minutes/ 

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 http://www.developerfusion.com/tools/convert/csharp-to-vb/  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 t_object.name = '#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 _ 

 Repository.GetCurrentDiagram().DiagramObjects 
  oElement = Repository.GetElementByID(oDiagramObject.ElementID) 
 If Me.CheckUniqueElement(oElement, Repository) = FalseThen 
   oWnd.AddElement(oElement) 
  End If 
 Next 
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 http://www.interactory.nl/frmFormManager.aspx?webpage=dla2ea 

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.

Page 1 of 2