Guillaume Finance

VISEO (Sparx EA Expert, OMG OCSMP Model User certified)
Modelling consultant and expert on Sparx Systems Enterprise Architect modelling tool and solution, I'm helping clients with the model-based approach using standards for a number of contexts including:
- Software analysis, design and architecture with UML.
- Systems Engineering and MBSE with SysML.
- Enterprise Architecture, IT landscape with UML or ArchiMate.
- Business processes with BPMN.
My other activities include:
- Defining and maintaining the model repository including requirements, analysis and design for software projects.
- Remote support and expertise on Sparx Enterprise Architect modelling.
- Running training sessions on UML or SysML with Sparx Systems Enterprise Architect.
- Installation and configuration of Prolaborate web solution for Sparx EA.
I publish articles and news about modelling languages and Enterprise Architect on my blog, maintain eaUtils free addin:, and I participate in the European EA User Group events
Contact details: guillaume[at]

Enterprise Architect includes the package baseline feature that lets you create snapshots - backups of your model within the project (data is stored in the project's database). Once the baseline feature is used, it can be cumbersome to find the packages that have baselines. Such information can be required e.g. to delete baselines that are no longer relevant in order to free some space, or to find the most recent backup from a model's parent package.

This article provides a user defined search, FindPackageBaselines, that lets you search through all existing baselines within the project, and display the associated package in the Project Browser.

Find Package Baselines Enterprise Archirect user defined search

I created the following search module, named FindPackageBaselines (SQL Editor type), with the following content:

SELECT o.ea_guid AS CLASSGUID, o.Object_Type AS CLASSTYPE, d.DocName, d.Notes, d.Version
FROM t_document d left join t_object o on d.ElementID = o.ea_guid
WHERE d.docType = 'Baseline' AND and DocName LIKE '*<Search Term>*'

To create this search module within your Enterprise Architect client:

  • open the search module (Ctrl-F or use the menu Edit > Find in Project)
  • click on Builder followed by New
  • enter the name FindPackageBaselines and select SQL Editor as the type
  • copy/paste the above content (SQL query)
  • save the search module

This user defined search looks for the existing project's baselines. If a search criteria is provided via the "Search Term" field, the search will restrict results on the packages which name includes the provided term.

Below is an example with the search criteria "component": only baselines of the "Component Model" package are displayed in the results.

When the search term is empty, all existing baselines are displayed.

Notes: project root's baselines are displayed with a different icon, as illustrated above with "Model".

eaDocX's eaXL module makes it possible to import and export information between Excel and Sparx Enterprise Architect, e.g. requirements, classes (including attributes or methods), use cases, etc.

This article provides a feedback on a real-life experience where eaXL has been used for a request for proposal (RFP): more than a hundred requirements have been imported into Enterprise Architect in order to carry the analysis and build the response with the aid and support of the model-driven approach. Steps involved to import the customer's requirements are covered in this article.

Note: eaXL module for Excel support requires eaDocX Corporate edition.


I recently worked on an RFP that included more than a hundred requirements organised by categories. Details of each requirement (description, reference, category) were provided in an Excel file that had to be completed and returned with our response and proposals. Being given the task to analyse each requirement and assess the feasibility and complexity, I chose to build the response and capture all the elements within an Enterprise Architect modelling project.

A response to an RFP usually requires to work on a wide array of topics and queries. Model-driven can ease up this task by gathering and structuring all the elements created for this purpose. Collaborative access to the modelling project also enables several peers to share the tasks.

Once a new Enterprise Architect project had been set up, the client's requirements were imported via the following the process:

eadocx eaxl import client requirements in enterprise architect

Summary of the main steps from the above BPMN2 diagram:

  • Step A: prior to run an import from Excel with eaDocX's eaXL, an Excel file needs to be generated. To do so, eaXL export must be run with at least a single blank requirement from Enterprise Architect. This first step involves creating a couple of blank requirements in the model.
  • Step B: run an eaXL export of the blank requirements from Enterprise Architect into a generated Excel file.
  • Step C: populate the Excel file with the requirements provided by the client.
  • Step D: import the client's requirements from Excel to Enterprise Architect using eaXL.

Step A: create blank requirements in the Enterprise Architect model

A1. Once the Enterprise Architect project has been initialised, blank requirements are created in the requirements model (eaXL needs to have at least one requirement to export in order to generate an Excel file).

A2. Tagged values are added to the blank requirements so that additional information provided by the client can be entered in the Excel spreadsheet, e.g. Feasible (true/false), Priority, and Category

requirements model sparx enterprise architect

Step B: export the blank requirements from the Enteprise Architect project to Excel with eaXL

B1. In order to generate an Excel file that's compatible with eaXL, an export is run from the Enterprise Architect requirements model to Excel via a right click on the source package > Extensions > eaDocX > Open in Excel.

  • Result: blank requirements have been exported into a new Excel file.

B2. Additional properties are enabled via the eaXL columns tab: Name, Alias, Description, and the pre defined tagged values (Feasible, Priority, and Category).

export requirements eadocx eaxl

B3. The Excel content is updated by clicking on the button "Export data from EA to current worksheet".

  • Result: the Excel file has been updated with the additional properties.

export requirements eadocx eaxl Excel file output

Step C: populate the Excel eaXL template file with the client's requirements

C1. All the client's requirements must be copied from the original file to the eaXL generated Excel file, under a separate worksheet.

C2. In the current scenario, the available information is organised under the following Excel columns:

  • Excel column B - Ref (reference)
  • Excel column C - Category
  • Excel column D - Description (full requirement's text)
  • Excel column E - Title: some of the requirements contain a very long body description, hence their title has been set using an Excel function (STTX) to truncate the description to the first 200 characters

customer requirements data to import to enterprise architect from Excel

C3. Using references between cells, the first worksheet has been populated with details according to the eaXL columns (worksheet no 1 is used by eaXL import/export).

  • Excel column D - Name : formula = "=Feuil2!E2" (Title column from worksheet 2)
  • Excel column E - Alias : formula = "=Feuil2!B2" (Ref column from worksheet 2)
  • Excel column F - Description : formula = "=Feuil2!D2" (Description column from worksheet 2)
  • Excel column G - TV Category : formula = "=Feuil2!C2" (Category column from worksheet 2)
  • Excel column H - TV Priority : value = "M" (default value = Must)
  • Excel column I - TV Feasible : value = "1" (default value = true)
  • Excel column C - ElementType : value = "Requirement" (provides eaXL with the element type to import)

eadocx sparx customer requirements data to import to enterprise architect from Excel

Step D: import the client's requirements from Excel to the Enterprise Architect project with eaXL

D1. In Enterprise Architect eaDocX/eaXL is used to run a comparison with the model:

eadocx eaxl Sparx comparison Enterprise Architect Excel

D2. eaXL import from Excel to Enterprise Architect is run via the action "Import contents of worksheet into EA".

  • Result: requirements have been imported in the model with the title, description and tagged values for the feasibility, priority, and category.

eadocx eaxl Sparx imported requirements into Enterprise Architect from Excel

Tagged values from an imported requirement are illustrated below:

 eadocx eaxl Sparx imported requirements into Enterprise Architect from Exce tagged values

D3. At this stage, blank requirements created in step A are deleted.

D4. Using a custom VB script in Enterprise Architect, each requirement is moved into a sub package, named after the Category Tagged Value. This is intended to simplify the organisation of requirements within the model.

run enterprise architect script

  • Result: requirements are grouped by category in the project tree.

enterprise architect project browser requirements eaXL

Next steps: building the response and proposal, generate the Excel deliverable

Having all the RFP requirements in the modelling project, the analysis and elaboration of the answer can be carried out:

  • Creating "response" stereotyped requirements and Feature elements. Associate these elements to the client's requirements.
  • Creating UML/BPMN diagrams to suggest an architecture, illustrate the solution or an option to one or several requirements.
  • Assessing and updating the Feasibility tagged value for each requirement.
  • Exporting results to Excel with eaXL.
  • Generate the response and answser to the RFP in the Word forma using eaDocX.


Enterprise Architect made it possible to efficiently carry out the analysis of a long list of requirements by building up the models with the solution's elements, links between requirements of similar purpose, and realisation links between the RFP requirements and solution elements. Once the analysis had been completed, generating the Excel deliverable for the client only required a few minutes.

This Excel file was ready to be sent alongside a Word document generated with eaDocX, including a relationships matrix between requirements and system features to implement.

In case the RFP process has been successful, a model-driven approach provides the advantage of starting the project with an existing Enterprise Architect project.

The Excel import/export feature for Enterprise Architect available with eaDocX (eaXL module) can be used for many other purposes: importing requirements and use cases in the project, synchronise requirements with other tools via the Excel format, import business classes from Excel, etc.

Last May I went to the European EA User Group in the UK (Maidenhead) where the Enterprise Architect community gathered. Prior to delivering my presentation on the alternatives to set up a shared Enterprise Architect project, I attended several presentations, including the following ones that are covered in this article:

  1. Pragmatic agile model driven development using smart use cases by Sander Hoogendoorn (Capgemini, NL)
  2. Enterprise Architect Version 11 Cloud Services, OSLC and RAS by Phil Chudley (Dunstan Thomas, UK)

Pragmatic agile model driven development using smart use cases

Sander Hoogendoorn shared the use of smart use cases, coupled with Enterprise Architect and a custom-made code generation tool, Tobago MDA.

Smart Use Cases

Sander and his team at Capgemini developed their own agile process, called SMART, which involves the use of smart use cases to capture and manage functional requirements, as explained hereafter. Note: the SMART agile process has been applied over the past 10 years; it is based on agile and iterative best practices.

Smart use cases match « sea » and « fish » granularity use cases according to the following levels defined by Alistair Cockburn in his book "Writing Effective Use Cases":

Where traditional use case modeling can lead to several pages of documentation, including triggers, pre/post conditions, actors, main/alternative scenarios, and so on, smart use cases maintain a visual deliverable via use case diagrams as each use case is detailed by several smaller use cases connected with “extends” and “includes” associations (smart use cases can be reused amongst use cases). On average, a “standard” use case is associated with 20 smart use cases.

Stereotypes have been created to choose the type of a smart use case from a list of identified patterns: select, search, manage, file import or export, validation service, etc. Smart use cases also serve estimation purposes. An estimation value has been defined on the smart use case stereotypes to provide a default value (from 1 to 10 points) according to the selected type (e.g. 2 points for a “select” smart use case). This enables accessing all the information from our models and diagrams as illustrated below:

Here is another example with UI smart use cases in yellow and a Service smart use case in red, alongside their respective estimation points.

Project Management Dashboard

In order to manage the project according to the smart use cases defined in Enterprise Architect, website has been created by Sander and his team. This site makes it possible to import/export smart use cases with Enterprise Architect via XMI or CSV files for planning and progress management.

Here is an illustration where smart use cases have been imported from Enterprise Architect:

Tobago MDA code generation tool

Sander released with his team Tobago MDA, a code generation tool built for smart use cases defined in Enterprise Architect. This tool generates source code based on templates, making it possible to define the content required by any programming language (e.g. dotNet C#, Java, PHP…). Tobago MDA is shipped with pre-defined templates used by Capgemini for different types of projects including Java, .Net, PowerBuilder (Sybase – SAP), and BI. Tobago MDA has been used in dotNet projects to produce 100% of the code for average use cases.

The Tobago templates are easy to understand text files. Syntax mechanisms built for these templates include tags and methods e.g. to loop on a class attributes, test an empty value, etc. Tobago MDA can access the Enterprise Architect models using an XML file created via an XMI export, or by connecting directly to an Enterprise Architect project without having to open Enterprise Architect.

The presentation ended with a demonstration; Sander created in the Enterprise Architect project a “search” smart use case to add a new Search feature for an existing dotNet web application. Once the model was updated, Tobago was launched to generate new C# files. Then Visual Studio was used to re-build the application. Finally the app was run to show that a new search feature was available, with criteria matching the attributes entered in the smart use case.

Tobago MDA is available from the following site:

New Enterprise Architect 11 features: Cloud Services, RAS, OSLC

Phil Chudley from Dunstan Thomas gave us an efficient speech and demo based on his in-depth trial of new Enterprise Architect 11 features: Cloud Services, OSLC, and Reusable Asset Service.

Cloud Services

Cloud Services makes it possible for Enterprise Architect 11 users to access Enterprise Architect projects from anywhere via the http/https protocols. As a result an Enterprise Architect project can be either accessed from the LAN or from the Internet. Cloud services provide short response times to suit slow remote access.

Cloud Services are available to download for free from Sparx Systems website. It can be installed as a Windows Service or integrated with an existing IIS web server. Installation includes a management client software. Setting up a user access to a project is very easy; only the url and credentials are required (compared with a project hosted on a local database requiring an ODBC connector driver and the connection string to the DB).

Note: this service doesn’t work with EAP files i.e. a DBMS must be used.

Note: Sparx Cloud Services mustn’t be confused with hosting services in the Cloud, such as a MS Azure SQL Database available online, since they aim at providing access to locally hosted Enterprise Architect projects from the Internet.

Once installed, the management software can be used to expose to the outside world one or several Enterprise Architect projects, as per the provided configuration including: http or https protocol, authentication mode, read-only access enabled/disabled, and setting any limitation on the max number of concurrent users. This software also displays the currently opened projects via the Cloud Services.

http connection to Enterprise Architect models has enabled Sparx Systems to provide additional features: OSLC and RAS.

OSLC: Open Services for Lifecycle Collaboration

The Open Services for Lifecycle Collaboration (OSLC) is an open community that has defined a set of specifications to enable integration of software development, e.g. to let Application Life-cycle Management (ALM) and Product Life-cycle Management (PLM) software communicate and exchange information.

Enterprise Architect 11 currently supports OSLC to access and manage requirements only. Requirements can be accessed with an XML content through the use of urls from a browser. A client application can be implemented to access web services from Sparx Enterprise Architect in order to run queries or create new requirements.

Examples: Query -> http://server-name:port/repository-name/oslc/qc/?oslc.where=ss:type=“Functional”, Create -> http://server-name:port/repository-name/oslc/cf/

Note: it is currently possible to test OSLC queries from online SparxSystems Enterprise Architect projects, as illustrated below:

With the following url, results are limited to « Chuck Wilson » author:

RAS: Sparx Systems Reusable Asset Service

Reusable Asset Service or RAS is intended to let various teams integrate in their respective Enterprise Architect projects distributed and reusable models/resources, stored in a central Enterprise Architect project, acting as a library or framework. Users may update the reusable assets and resources from Enterprise Architect providing they have a write access.

To use RAS, an Enterprise Architect project must be set up in a central database (e.g. MySQL, SQL Server…), with access via http using Sparx Cloud Services, where reusable models will be created and published. Users can access its content using the RAS feature from another Enterprise Architect project.

Provided a user has a write access, a package that for instance contain a class model for a Bookstore can be added to the shared and reusable project.

Once this is done, other teams of users can open the RAS model and import the published package to use it. Phil pointed out during his demo that management of dependencies between packages in RAS should be improved.

It seems to me that this feature could especially be useful and applied for a project Framework, or to let standards organizations publish and share their models for anyone to use in their Enterprise Architect project.


This year’s EA User Group has really been interesting thanks to the content delivered during the presentations. It has also been an opportunity to meet and exchange with other Enterprise Architect users and experts.

Official EA User Group website:

Early this month, I published a script to sort elements from a selected package by the alias name. This article provides another project browser script that finds and selects the classifier for an instance or a class attribute, or the property type for a SysML port or part.

Sparx Enterprise Architect makes it possible to find from a diagram an instance classifier with a right click > Find > Locate Classifier in Project Browser, or a SysML port/part's classifier with a right click > Find > Locate Property Type in Project Browser. 


As there isn't any similar feature from the project browser, I wrote a script to achieve it, whilst extending it to a class attribute.

Enterprise Architect Project Browser scripts

Enterprise Architect lets you create project browser scripts. Once created in your project, these are available via a right click on a selected package from the browser, as illustrated below:

sparx enterprise architect project browser find-classifier-for-instance-port-part-attribute


Find the classifier of an instance, port, part, or attribute with FindClassifier project browser script

To add the FindClassifier Project Browser script to your modelling project:

Step 1: open the scripting view using the Enterprise Architect menu Tools > Scripting.

Step 2: click on "New Project Browser Group" to store all user-defined scripts, e.g. Project Browser scripts.

Step 3: click on "New script > New VBScript" to define the "Find Classifier" script, e.g. FindClassifier.

sparx enterprise architect project browser script findclassifier

Step 4: open the script and copy/paste the content from the following file: download FindClassifier VBScript text file

Step 5: save the script (Ctrl-S).

Step 6: test the FindClassifier script with a right click on a selected object from the Project Browser to find its classifier, and select Scripts > FindClassifier

Result: the instance's class has been selected from the Project Browser as illustrated below.

sparx-enterprise-architect-project_browser_script_sortbyalias_running result

Here is another example of using this script with a class attribute:

sparx-enterprise-architect-project_browser_script_sortbyalias_running result


I recently imported a number of requirements in my Enterprise Architect project with the following details: title, reference (stored in the requirement's alias), and description. By default Sparx Enterprise Architect sorts requirements within a given package by the element's name in the alphabetical order. When a package contains various types of elements (e.g. classes, interfaces, use cases, etc.), each group of elements from the same type is sorted separately. The following illustrates a mix of requirements, classes, and interfaces created within a package, in their default sorting order:

sparx enterprise architect project browser


Going back to my requirements, I needed to sort them by the alias value e.g. REQ-TEST-001, REQ-TEST-002, REQ-TEST-003, etc. On the following screenshot, I illustrated on the left hand side the default sorting order in Enterprise Architect project browser, and on the right hand side the list of requirements in the desired alias order. 

sparx enterprise architect project browser sort by script


This article explains how to create and use an Enterprise Architect Project Browser script aimed at sorting elements from a selected package by the alias name. An additional script is provided at the end of the article to sort elements by a dedicated Tagged Value called "SortingOrder".

Enterprise Architect Project Browser scripts

Enterprise Architect lets you create project browser scripts. Once created in your project, these are available via a right click on a selected package from the browser, as illustrated below:

sparx systems enterprise architect project browser script


Sort by alias project browser script

To add the SortByAlias Project Browser script to your modelling project:

Step 1: open the scripting view using the Enterprise Architect menu Tools > Scripting.

Step 2: click on "New Project Browser Group" to store all user-defined scripts, e.g. Project Browser scripts.

Step 3: click on "New script > New VBScript" to define the "Sort By Alias" script, e.g. SortByAlias.

sparx enterprise architect project browser script sortbyalias

Step 4: open the script and copy/paste the following content (or download the VBScript text file here). 

  1. option explicit
  2. !INC Local Scripts.EAConstants-VBScript
  3. !INC EAScriptLib.VBScript-Logging
  4. ' Script Name: SortbyAlias 
  5. ' Author: Guillaume FINANCE, guillaume[at]
  6. ' Purpose: Sort elements contained in the selected package from the Project Browser by the Alias name
  7. ' Date: 03/04/2014
  8. sub SortDictionary (objDict)
  9.    ' constants
  10.    Const dictKey  = 1
  11.    Const dictItem = 2
  12.    ' variables
  13.    Dim strDict()
  14.    Dim objKey
  15.    Dim strKey,strItem
  16.    Dim X,Y,Z
  17.    ' get the dictionary count
  18.    Z = objDict.Count 
  19.    ' sorting needs more than one item
  20.    If Z > 1 Then
  21.      ' create an array to store dictionary information
  22.      ReDim strDict(Z,2)
  23.      X = 0
  24.      ' populate the string array
  25.      For Each objKey In objDict
  26.          strDict(X,dictKey)  = CStr(objKey)
  27.          strDict(X,dictItem) = CStr(objDict(objKey))
  28.          X = X + 1
  29.      Next 
  30.      ' perform a a shell sort of the string array
  31.      For X = 0 To (Z - 2)
  32.        For Y = X To (Z - 1)
  33.          If StrComp(strDict(X,1),strDict(Y,1),vbTextCompare) > 0 Then
  34.              strKey  = strDict(X,dictKey)
  35.              strItem = strDict(X,dictItem)
  36.              strDict(X,dictKey)  = strDict(Y,dictKey)
  37.              strDict(X,dictItem) = strDict(Y,dictItem)
  38.              strDict(Y,dictKey)  = strKey
  39.              strDict(Y,dictItem) = strItem
  40.          End If
  41.        Next
  42.      Next
  43.      ' erase the contents of the dictionary object
  44.      objDict.RemoveAll
  45.      ' repopulate the dictionary with the sorted information
  46.      For X = 0 To (Z - 1)
  47.        objDict.Add strDict(X,dictKey), strDict(X,dictItem)
  48.      Next
  49. ' sort the package elements based on the new sorting order
  50. dim newOrder
  51. newOrder = 0
  52. dim theItem
  53. dim eaelement
  54.  for each objKey in objDict
  55. theItem = objDict.Item(objKey)
  56. Set eaelement = Repository.GetElementByGuid(theItem)
  57. 'change the position of the element in the package to the new sorting order value
  58. eaelement.TreePos = CLng(newOrder)
  59. eaelement.Update()
  60. newOrder = newOrder + 1
  61. next
  62.    end if
  63. end sub
  65. sub sortElementsbyAlias (selectedPackage)
  66. LOGInfo("Processing selected package " & selectedPackage.Name)
  67. dim elements as EA.Collection
  68. dim i
  69. dim processedElements
  70. set processedElements = CreateObject( "Scripting.Dictionary" )
  71. set elements = selectedPackage.Elements
  72. for i = 0 to elements.Count - 1
  73. dim currentElement as EA.Element
  74. set currentElement = elements.GetAt( i )
  75. LOGInfo("Processing " & currentElement.Type & " no " & i & " with alias " & currentElement.Alias & "(" &  currentElement.ElementGUID & ")")
  76. processedElements.Add currentElement.Alias, currentElement.ElementGUID
  77. next
  78. LOGInfo("Sorting package elements")
  79. SortDictionary processedElements
  80. end sub
  81. '
  82. ' Project Browser Script main function
  83. '
  84. sub OnProjectBrowserScript()
  85. Repository.ClearOutput "Script"
  86. LOGInfo( "Starting SortbyAlias script" )
  87. LOGInfo( "==============================" )
  88. ' Get the type of element selected in the Project Browser
  89. dim treeSelectedType
  90. treeSelectedType = Repository.GetTreeSelectedItemType()
  91. select case treeSelectedType
  92. case otPackage
  93. ' Code for when a package is selected
  94. dim thePackage as EA.Package
  95. set thePackage = Repository.GetTreeSelectedObject()
  96. sortElementsbyAlias thePackage
  97. Repository.RefreshModelView (thePackage.PackageID)
  98. case else
  99. ' Error message
  100. Session.Prompt "This script does not support items of this type.", promptOK
  101. end select
  102. end sub
  103. OnProjectBrowserScript

Step 5: save the script (Ctrl-S).

Step 6: right click on the target package from the Project Browser where elements need to be sorted by the alias, and select Scripts > SortbyAlias

Result: the requirements have been sorted by the alias value as illustrated below.

sparx-enterprise-architect-project_browser_script_sortbyalias_running result

This sorting order is consistent with the requirements' alias values:

sparx enterprise architect project_browser_script_sortbyalias done

Sort by tagged value 'Sorting Order' project browser script

In some cases, the alias value may not be appropriate to sort your elements within the selected package. Based on the above SortByAlias script, I created the SortbyTaggedValue_SortingOrder script aimed at sorting elements using a tagged valued created for this purpose, SortingOrder.

To illustrate its use, I added the SortingOrder tagged value to each requirement:

sparx enterprise architect project_browser_script_sortby tagged value

To add the SortByTaggedValue Project Browser script to your project:

Step 1: open the scripting view using the Enterprise Architect menu Tools > Scripting.

Step 2: open the Project Browser scripts group.

Step 3: click on "New script > New VBScript" to define the "Sort By Tagged Value" script, e.g. SortbyTaggedValue_SortingOrder.

Step 4: open the script and copy/paste the following content from the script that can be downloaded here

Step 5: save the script (Ctrl-S).

Step 6: right click on the target package from the Project Browser where elements need to be sorted by the alias, and select Scripts > SortbyTaggedValue_SortingOrder.

sparx enterprise architect project_browser_script_sortby tagged value open


Result: the requirements have been sorted by the SortingOrder tagged value as illustrated below.

sparx enterprise architect project_browser_script_sortby tagged value result


This article illustrated how Sparx Enterprise Architect can be tailored to introduce new features via user defined scripts, e.g. to apply a new sorting rule on the elements from a selected package. It could be further improved e.g. to sort elements within the sub packages and so on.


A colleague recently enquired about a simple way to run a batch import of several XMI files into an Enterprise Architect project. The client's project required importing a rather large number of XMI files, created from various Enterprise Architect projects via the standard XMI export (note : each file store an extraction in the XMI format from a selected part of the modelling project). Having to import each XMI file is too cumbersome, and Enterprise Architect's existing "Batch XMI Import" is limited to controlled packages i.e. involving a VC repository like SVN set up with the current project.

This article explains how to create in your Enterprise Architect project a VBScript that can be used import a batch of XMI files, located on a local or networked drive, within a selected package from the browser.

Step 1: open the scripting view using the menu Tools > Scripting.

Step 2: click on "new normal group" to store all user-defined scripts, e.g. MyScripts.

Step 3: click on "new script > new VBScript" to define the Batch XMI Import script, e.g. BatchXMIImport.

enterprise architect scripting view

Step 4: open the script and copy/paste the following content (or download the VBScript text file here). 

  1. option explicit
  2. !INC Local Scripts.EAConstants-VBScript
  3. '
  4. ' Script Name: XMIImportFiles
  5. ' Author: G.Finance guillaume[at] 
  6. ' Purpose: Batch import of XMI files to the selected package
  7. ' Date: 13/01/2014
  8. ' HOW TO USE  : 1. Set the target directory in the targetFolderA variable (use \\ for each backslash) ; you may enable additional folders if required
  9. '               2. Add each XMI filename to process into the "fileList" array variable
  10. '             3. Run the script
  11. '
  12. '
  13. ' [USER ACTION 1] : update the target folder where the files to process are located
  14. dim targetFolderA
  15. targetFolderA = "C:\\temp\\"
  16. ' Additional target folders to use if required
  17. 'dim targetFolderB
  18. 'targetFolderB = "D:\\"
  19. 'dim targetFolderC 
  20. 'targetFolderC = "E:\\"
  21. '
  22. '
  23. ' ArrayList Object to store the name of each file to process (including the folder name, using one of the "targetFolder" variables)
  24. dim fileList
  25. Set fileList = CreateObject("System.Collections.ArrayList")
  26. ''[USER ACTION 2] : update the following list with the name of each file to process, specifying first the associated targetFolder variable
  27. fileList.Add targetFolderA + "class.xml"
  28. fileList.Add targetFolderA + "deploy.xml"
  29. fileList.Add targetFolderA + "uc.xml"
  31. ''add new lines above if required
  32. dim projectInterface as EA.Project
  33. dim result
  34. set projectInterface = Repository.GetProjectInterface()
  35. sub XMIImportFiles()
  36. Repository.EnsureOutputVisible "Script"
  37. Repository.ClearOutput "Script"
  38. Session.Output( "VBScript XMI Import Files" )
  39. Session.Output( "=======================================" )
  40. ' Get the selected package to import the XMI files 
  41. dim contextObjectType
  42. contextObjectType = Repository.GetContextItemType()
  43. ' Check if the selected element is a package ; if not display a message and exit
  44. if contextObjectType = otPackage then
  45. ' Get the context object as a package
  46. dim contextPackage as EA.Package
  47. set contextPackage = GetContextObject()
  48. Session.Output( "Selected Package : " & contextPackage.Name )
  49. Session.Output("TARGET PACKAGE GUID = " & contextPackage.PackageGUID & "(ID : " & contextPackage.PackageID & ")" )
  50. ' Process each XMI file set in the fileList Array Object
  51. Dim xmiFile
  52.         For Each xmiFile In fileList
  53.             Session.Output("Processing " & xmiFile & "..." )
  54. ''Import the content of the XMI file to the selected package
  55. result = projectInterface.ImportPackageXMI(projectInterface.GUIDtoXML(contextPackage.PackageGUID), xmiFile, 1, 1)
  56. Session.Output(result)
  57. Next      
  58.    }
  59. else
  60. ' Package is not currently the context item
  61. MsgBox( "This script requires a package to be selected." & vbCrLf & _
  62. "Please select a package and try again." )
  63. end if
  64. end sub
  65. XMIImportFiles

Step 5: set the folder name(s) and filenames to process by updating the script's content.

  • Let's say you need to import C:\old\usecases.xml and C:\current\class.xml XMI files, created from a separate EA project.
  • Update targetFolderA variable on line 15, using \\ for each backslash: targetFolderA = "C:\\current\\"
  • Uncomment targetFolderB variable on line 17: dim targetFolderB
  • Update targetFolderB variable on line 18: targetFolderB = "C:\\old\\" 
  • Set the values in the ArrayList object (from line 27): fileList.Add targetFolderA + "class.xml", fileList.Add targetFolderB + "usecases.xml"
  • Save (ctrl-S)

Step 6: select the target package (or view) from the Project Browser, and click on the "run script" to import all XMI Files (important : it is not possible to select a Model Root as the target)

scripting_enterprise-architect-batch-xmi-file-import run script

 Note: results and notification messages are displayed in the System Output view (opened automatically once the script starts running)

scripting_enterprise-architect-batch-xmi-file-import run script

 Result: the content of both XMI files is available from the selected package within the Project Browser.

scripting_enterprise-architect-batch-xmi-file-import result

Note : if your XMI file contains a model root, or a view (package at N+1 level) such as "test" from the above Project Browser illustration, it will be imported as a package within the selected package or view.

I attended on the 7th of November a webinar from Sparx Systems about setting up a team modelling environment with Enterprise Architect using a centralised DBMS. This webinar was presented by Scott Hebbard, Communications Manager at Sparx Systems. It involved a step by step demonstration to cover the following topics:

  • create a DB schema for the shared Enterprise Architect project with the chosen DBMS product (e.g. MySQL);
  • create and configure the ODBC settings to access the database;
  • initialise the project with Sparx base or an existing project;
  • enable security and define groups, users, and permissions;
  • use Enterprise Architect "Model mail" to enable communication throughout the team;
  • define project tasks, resources, and manage them via a Gantt diagram;
  • manage project literature using the Enterprise Architect Team Review.

Further links :

This article provides highlights from this presentation and the Q&A session between Sparx and the audience :

  • Setting up the database schema and the ODBC connection is fairly straightforward.
  • SparxSystems does not have any preferred or recommended DBMS vendor, so users are free to choose from any supported product such as MySQL, SQL Server, Oracle, PostgreSQL, etc.
  • Lazy load DB setting should be set to improve efficiency.
  • The project must be initialised first either from Enterprise Architect base project or from an existing project (it uses the Project Transfer).
  • Once Enterprise Architect security is enabled on the project (requires a key from your Sparx registered users section), users and groups can be created.
  • Permissions can be set for users and/or groups e.g. Manage Diagrams to update/create/delete diagrams, Update Element to update/create/delete elements, packages and relationships, Use Version Control to run Check In/Out when the DB project is coupled with a VC repository such as SVN.
  • Scott talked about Enterprise Architect mail and project management features, which can be used in such shared DB environment:
    • The Mail Model enables all authenticated users to exchange messages ; all these messages are stored within the Enterprise Architect project (inside the database). This feature cannot integrate with a standard mail program.
    • A project calendar and gantt view with tasks and resources management is available.
    • The Team Review lets the team manage topics, organised within categories, for which a document that's stored within the project can be maintained and submitted for review (approval status are available : awaiting approval, approved, rejected)
    • Mail Model, Team Review and Project management features look interesting and useful from a project management and team collaboration perspective.
  • An interesting question asked was as whether Enterprise Architect security makes it possible to manage and restrict access to specific packages or parts of the model. Scott advised that this is not possible.
    • In my opinion and from past experience, this can be achieved by coupling the project with SVN or any compatible version control repository, and set access permissions on chosen folders or path (e.g. provide full access to groupA on path trunk\models\requirements_model, and read-only access to all other users).
    • The other topic raised dealt with hiding parts of the model from specific users ; this is feasible but not straightforward as suggested by Scott: "you cannot hide parts of the model from users. Instead, you could export the relevant parts of the model using XMI and make these available to users that should only see part of the model".
  • Another question asked was about Enterprise Architect compatiblity with Active Directory (directory service implemented by Microsoft for Windows domain networks)
    • Sparx answer : " it is possible to import user ID's from Windows Active Directory into Enterprise Architect for the purpose of managing Role Based Security. This allows you to reference user ID's that are listed in Active Directory. It is important to note that for each Windows User ID, Enterprise Architect automatically generates a random password, rather than using the Domain password. However, if necessary you can assign a new password to any imported user ID."
    • For more information : Import User IDs from Active Directory
  • Finally Scott advised that Enterprise Architect does not authenticate directly against the LDAP group. However, you can import your Windows user IDs from Windows Active Directory and use those as the security user IDs with Windows Authentication. There is a check box on the Security Users dialog to "Accept Windows Authentication".


Sparx Systems Enterprise Architect is a great tool to produce and organise your models using UML, SysML, BPMN or other modelling languages or notations.

In some cases, the default rendering of elements on certain types of diagrams lacks a suitable colour scheme and font.

This article deals with two topics :

  • Highlight the strengths of Enterprise Architect as a modelling tool versus that of a drawing tool,
  • Applying visual styles to improve the look and feel of your diagrams.

A vital switch from a drawing tool to a comprehensive modelling tool

Initial context : A colleague and I discovered a set of BPMN diagrams maintained by a team using a BPM modelling tool, Bizagi BPMN Business Process Modeler. Being a freeware must have helped to quickly try and adopt this tool for the project. I have to say that the rendering of the diagrams looked rather attractive and modern. As a UML and BPMN expert, my colleague was the first one to get involved in this task. He started to model new business processes, and update existing ones as requested. He noticed a number of mistakes (e.g. broken sequence flow, missing end event) that he promptly fixed.

As things went on, we had a chat and I asked what he thought about this tool compared with Sparx Enterprise Architect. His feedback was interesting ; Bizagi was more or less a drawing tool like Ms Visio, that can be used to create a couple of UML diagrams. A project browser was  missing from Bizagi i.e. when you create a BPMN node like an activity or gateway, you have no access to this element so that it can be reused into several diagrams. Not to mention all the other powerful advantages from Enterprise Architect including traceability with other model elements from the same project, e.g. to link an activity with a requirement it fulfils, or with a use case to establish links between the business and system analysis models.

The need for a real modelling project quickly lead to a move from Bizagi modelling tool to Enterprise Architect, as agreed by the client.

Applying visual styles to improve BPMN diagrams rendering

As I started to create and maintain BPMN diagrams in Enterprise Architect, I looked at simple ways to reproduce a similar look and feel from the original tool (Bizagi).  The aim was to improve the default rendering of Elements in Enterprise Architect.  Below,  I managed to reproduce a similar visual style using the following colour schemes:

  • BPMN2 start event : light green background + dark green line

 Sparx EA diagram visual start on BPMN start event

  • BPMN2 end event : light red background + dark red line

 Sparx EA diagram visual start on BPMN end event

  • BPMN2 activities and gateways : light blue background + dark blue line


The procedure to create those visual styles is quite easy:

  • 1- I first defined the visual settings on a selected element using the diagram toolbar by setting the background colour, line colour and width, and the font.
  • 2- Then I clicked on Save as New Style icon from the toolbar, and entered the style name as prompted by Enterprise Architect, e.g. start event.
  • Alternatively, having an element with its visual settings already done, a new style can be created using the Get Style icon from the toolbar, followed by Save as New Style.
  • 3- Having repeated this process for each new visual style, I ended up with a list styles ready to apply onto my diagram's elements.

Note : Visual styles are stored within your Enterprise Architect project (e.g. the EAP file) but I haven't found them yet from the Reference Data to export them and share with others.

Once all visual styles have been defined, the following list can be opened from the diagram toolbar :


Here is an illustration of what I came up with, having applied the new styles :


As an Enterprise Architect user, you may have had the need to apply several times more or less the same set of elements on a given diagram, leading to numerous uses of copy and paste as new.

The "copy and paste" feature on a selection of elements, including their associations and layout works ok, but there could be a more suitable way to go about this. Given a context where we have our set of elements i.e. a pattern of modelling elements available from one or several diagrams within our model, we need to apply them several times onto a new diagram. Once the new diagram is created, the elements that need to be duplicated aren't available from this blank diagram. Hence the diagram that contains those elements has got to be opened first, followed by a selection on the elements of interest, copied to the clipboard (Ctrl+C). Then the newly created diagram needs to be displayed again so the paste as new command can be executed (Ctrl+Maj/Shift+V). We also need to ensure that any specific element or information, e.g. an activity description or a child composite diagram and its sub-elements, mustn't be re-used, hence they need to be deleted.

Enterprise Architect makes it possible to re-use a set of elements, their associations, any notes, and their layout on the diagram by creating UML patterns. Similarly to the use of design patterns (GoF), the aim is to define a set of elements that can be applied for modelling purposes.

In the following example, a test case has been represented by modelling each step to follow as a node within a UML activity diagram, e.g. : pre-conditions / initial context, expected result, test result (OK/KO).

We can abstract these elements to be represented as re-usable steps, shown here :

Once our pattern is defined in a standard diagram, such as the UML activity diagram above, we can save it into an Enterprise Architect UML pattern : open the Diagram menu > Advanced > Save UML Pattern, and save into a new XML file (e.g. C:\basic tests patterns.xml). Enable the "Merge" option if you need in some cases to merge a given activity (or another node) from your pattern with an existing activity from the target diagram (active diagram).

To import and have this pattern available from an EA project, open the Resources view (use the Project menu > Resources if this view is not displayed on your EA client), and right click onto UML patterns, choose "Import UML pattern", and browse to the UML pattern's XML file.

Your UML pattern is now available to use on your Enterprise Architect project ; it should be displayed within the list of UML Patterns. Simply drag and drop this pattern onto the current diagram to create a new test step with expected and test results, as defined in this UML pattern. This window lets you rename each element before it is created.

Of course UML patterns can be applied from any type of diagram (UML class, UML state machine, BPMN, SysML BDD, etc.) or model (analysis, design, tests, architecture, etc.).

I went to the first EAUG (Enterprise Architect User Group) on the 15th of May, where around 100 people from the EA community of users and experts gathered in London.

I summarised in this article a selection of talks I attended:

  1. "Modeling Software Intensive Systems" by Doug Rosenberg from ICONIX, hinting the concept of SwissML (SysML + UML) to reach the same amount of specifications for both software and hardware blocks of an embedded system. Doug discussed about the incompatibility of agile software development processes in a context where the delivered software is not the final product, but part of a system that encompasses software and hardware blocks, alongside safety and security risks associated with any possible bug.
  2. "SysML with EA" by Roman Bretz from Lieber Lieber GmbH who shared his experiences on clients projects where SysML modelling language and EA were used.
  3. "User Story : EA usage at EVRY" by Knut Paulsen from EVRY who explained how EA was used in his company, involving specific developments of EA Add'Ins such as a document generator and an Excel import/export tool, both tailored to comply with the adopted methodology.
  4. "User Story: How to do less work, have more fun and become (a bit) famous doing it" by Ian Mitchell from Ability Engineering, who shared his experience as a BA on large project at the European scale, leading to a number of advices and point of views to take into account!

SWISSML: not the Helvetica modelling language, but SYSML + UML to provide the same level of specifications on both software and hardware blocks

« Modeling software engineering systems » talk from de Doug Rosenberg at ICONIX deals with the critical role of specifications on embedded systems software. In a Software Engineering context, any software bug can not only lead to economic losses, but also to safety and security risks including those of life threatening nature. As regards, the realisation of the system's software blocks shouldn't be carried out separately from the specifications. However this is often the case e.g. where the software implementation is carried by a SCRUM development team.

To illustrate this, Doug used the American Airlines' reservation system, where he experienced as a passenger a bug in the issued ticket where the printed month was incorrect (e.g. March instead of Feb) despite his flight was confirmed on the right date. A simple search in Google showed that AA chose an agile development process for some its software.

Doug reminded some of the agile software development principles and methodologies:

  • TDD promotes writing tests first, refactoring and code fixing.
  • The agile manifesto « Working software over comprehensive documentation » statement leads to less detailed specifications (user stories).

According to him, those principles aren't compatible with a system engineering project, where detailed specifications are required, and simulating the model before its implementation is common practice, e.g. through the use of SysML (parametrics) or MatLab tools.

The choice of a separated agile process could increase the risks of critical bugs. In the given AA example, imagine the safety risks that could arise due to the passengers reservation system bugs if data from this software was fed into the aircraft luggage weight management system.

It would therefore be sensible to require the right level of specifications using UML models for the system's software, based on the system's SysML models. This leads to SwissML (UML + SysML).

Doug introduced the SysML pillars to model the system:

  • Requirements model
  • Domain model to define the vocabulary
  • Static models: block definition diagrams at 2 levels (sub-system & component), and internal block diagrams for a finer level of granularity
  • Behavioural models: use cases, sequence diagrams (design), activity diagrams to describe use case scenarios, and state machines.

SwissML involves producing the same level of specifications for hardware blocks (e.g. System on Chip) and software blocks. EA can be used to add to a modelling project with existing SysML models, UML models for the software. Hence the software components can comply with the existing system's requirements, and be defined through an appropriate and detailed level of specifications.

Note: choosing an agile development process to implement software wasn't the subject of this talk, instead it was discussed that those aren't compatible in a systems engineering context.


Roman Bretz from Lieber Lieber GmbH shared his experience with SysML, starting with a list of principles about modelling languages (e.g. to enable communication, requires that it is understood by all).

Based on his experience, projects where SysML and EA were used mostly include requirements and architecture models (SysML requirements, BDD, IBD diagrams), and only few included dynamic models as well (SysML activity, state machine, and use case diagrams).

Roman presented the structure of a "thermometer" EA project via the following SysML models:

  • Requirements model, enabling allocation/traceability links between requirements and elements from within other models.
  • System use case analysis
    • This is a decisive part of the model to set the functional scope of the system, and where the priority is given on use case results/post-conditions and the sequence of actions.
    • Then Roman described an interesting case: when setting up the model via the analysis process, the client didn't see the point of including a use case model, and estimated that it would be expensive to achieve. However Roman suggested carrying out the exercise to try and see. This led to the identification of more than 300 use cases, pointing out that the system functional scope wasn't clear. Carrying further on the use case analysis, around ten use cases were confirmed, which demonstrated the true benefits of working on a use case model.
  • System context to identify all entities in interaction with the studied system.
  • Domain model to associate business terms with SysML models.
  • Behavioural models
    • A system block's behaviour goes beyond the definition of its attributes and operation signatures. A block can also be associated via allocation links (e.g. traceability in a SE context) with activities, interactions (e.g. sequence diagrams), and state machines.
    • Activities and interactions match part of a block's operation implementation, whereas state machines define the block lifecycle.
    • From then, it can be useful in EA to manually represent additional compartments on a SysML block to show its state machines, activities, and interactions.

EA usage at EVRY

Knut Paulsen shared his experience on an advanced usage of EA at EVRY, company based in Norway.

UML Profile

EVRY has defined a UML profile to extend its use case models according to some principles from Alistair Cockburn book:

  • Additional properties have been added to the 'use case' element, available in the new use cases via tagged values.
  • Two stereotypes have been created on the 'use case' metaclass: summary & user goal.
  • A new stereotype has been created on the 'class' metaclass, "field list", to be used alongside use cases. "Field list" stereotyped classes are intended to define the list of fields that are involved with a use case, i.e. where this information is expected to be entered through one or several steps defined in the UC scenarios (e.g. name, address, date of birth, etc.). For instance we can define for the use case "search a client account" a list of fields with the following attributes: client reference, company name, client type. Note : I think that this concept is interesting as the list of required fields can be defined during the analysis, and be used at later stage when designing or implementing a User Interface.

EA Add’ins

Knut and his team have implemented 2 add'ins using EA API:

1- An Excel import/export to produce in an Excel file a list of requirements for each stakeholder to update directly in Excel, before importing thel back into EA. EA CSV export/import features are limited, hence the need for an add'in to easily synchronise requirements between Excel and Enterprise Architect.

2- Due to EA native document generator limitations, EVRY implemented its own Word document generator with advanced features:

  • keep a trace of all generated use case documents, alongside with the name of the person who approved, and the approval date for each version,
  • store a new version of the generated use case document (word or PDF format) into a shared folder, which location is defined in the add'in settings.

The advantages of complex and complete EA add'ins were illustrated throughout this talk, whilst showing a true investment of EVRY in extending EA capabilities to the methodology adopted by its teams.

These tools aren't publicly available, hence making this session very interesting to get a feel of what we can get against a given amount of efforts spent.

A single version of the truth

Ian Mitchell from AbilityEngineering shared his experience as a BA consultant on a large project at the European scale. Ian joined this project to deal with a large number of change requests and requirements.

Context: the first version of this product had been released, leading to numerous requests for the next revision. Those requests were submitted by product managers from each involved country, many of them being specific to local laws and regulations.

Ian started an Enterprise Architect project to capture the following:

  • Features submitted by the stakeholders (i.e. product managers),
  • a requirements model (requirements were associated with features),
  • a domain model to define business entities and the vocabulary,
  • risks, actions, changes, and issues, so e.g. a number of actions resulting from a project meeting could be captured in EA as 'action' elements, leading to new 'change' elements associated with those new 'action' elements to trace the impact of processed change requests.

EA has become an essential asset by capturing all the knowledge for "a single version of the truth", preventing having documents and information spread across wikis and file repositories. Ian provided us with an interesting advice: instead of attempting to redefine everything in EA, the Business Analyst should spend efforts in gathering and collecting existing documents, standards, or MS Visio drawings, and push them as references into EA so this project holds a relevant amount of knowledge, right from the beginning. From then, the team can for instance easily create a link in EA from a new business rule to an existing standard reference, e.g. preventing losing track afterwards of what justified this rule and its deletion for the wrong reasons.

Once the analysis was complete for the next product's version, a specifications document was generated and submitted to get the approval from each product manager. However since many items from this document were specific to a single country, many stakeholders were reluctant in giving their approval on a document which partially had no relevance from their perspective.

Ian decided to identify with each product manager what they exactly expected from the product. Traceability links were created in EA from stereotyped actors - stakeholder - and various elements within the models. This traceability made it possible to generate a specification document for each manager with a relevant set of requirements, business rules, and use cases. EA native document generator wasn't used as it was too limited, so Ian managed to achieve this using EADocX document generator.

To conclude:

  • Ian reminded us that no matter how well structured and managed an EA project is, the quality of our work is assessed through the content of the delivered documents. Hence it is paramount to generate the relevant information.
  • The EA project eventually became an essential asset for the client, leading to a new dedicated team responsible to maintain it.


This European EAUG has been a success; I gathered a number of very interesting and useful feedback from EA experts and consultants, and it let me discuss about various topics on EA with speakers and members of Enterprise Architect community.

More information is available from

Page 4 of 5