Enterprise Architect version 14.0

download
purchase

enzh-CNcsnlfrdehiiditkoplptruskessv

My Profile

Social Media Channels

facebook  twitter  youtube   linkedin

Guillaume

Guillaume

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 www.umlchannel.com, maintain eaUtils free addin: www.eautils.com, and I participate in the European EA User Group events www.eausergroup.com
Contact details: guillaume[at]umlchannel.com

The first EA User Group in Paris (France) will take place on the 17th of September 2015. 

The entry ticket costs 75€ and will give you access to talks on Enterprise Architecture with TOGAF and ArchiMate, SysML, model transformation to XSD, the Schema Composer, and eaDocX collaboration edition. Most presentations are based on the speaker's experience with a client's project.

For any request or information, please contact us on This email address is being protected from spambots. You need JavaScript enabled to view it..

Register nowhttps://www.eventbrite.fr/e/billets-enterprise-architect-user-group-eaug-france-17-sept-2015-17529184262

 

Call for Speakers

EAUG, France (Paris), 17th September 2015

Presentation opportunities are available for you to come and share your EA user story with the rest of the EA community at the first French Enterprise Architect User Group event in Paris, France on September 17th 2015.

We are interested in just about everything you do with Enterprise Architect, from the organisation of your model to enhancements you have made using MDG or the automation API, or even just a project with which you are especially happy. That said, we are not just after the sunshine stories and would be interested in hearing about any experiences learned the hard way. Presentations of an obvious or purely commercial nature will not be accepted.
Some example topics are:

  • Enterprise architecture (TOGAF, Archimate, DoDAF, UPDM)
  • Business Architecture, Capability Mapping, Process Modelling
  • Systems Engineering
  • Business Analysis, Requirements Management
  • Data modelling
  • Code generation, MDA
  • EA add’ins/automation, scripting
  • Document generation
  • Simulation
  • Tool adoption/deployment
  • MDG Technologies/UML profiles
  • Model collaboration and management
  • Test management

Do you have a story to tell? If so, please let us know on This email address is being protected from spambots. You need JavaScript enabled to view it.


French version

Appel à Orateur

EAUG, France (Paris), 17 Septembre 2015

Vous utilisez Enterprise Architect et vous souhaitez partager votre savoir-faire avec la communauté francophone? Nous vous invitons à partager et présenter votre expérience et expertise au premier Enterprise Architect User Group (EAUG) en France qui se tiendra à Paris le 17 Septembre 2015.
Nous recherchons des orateurs de divers secteurs d’activités, travaillant sur tout type de modèle :

  • Architecture d’entreprise (TOGAF, Archimate, DoDAF, UPDM)
  • Urbanisation
  • Modélisation de systèmes d’information
  • Modélisation de processus métier (BPMN)
  • Analyse et conception d’applications informatiques
  • Modélisation de données
  • Ingénierie système (SysML)
  • Modélisation de systèmes embarqués…

Ou ayant des expériences concernant la mise en œuvre de l’outil :

  • Génération de code, MDA
  • Interfaçage avec d’autres outils
  • Développement de MDG Technologies
  • Développement d’addins et de scripts
  •  Génération de documents…

Nous recherchons en priorité des retours d’expérience sur l’utilisation d’Enterprise Architect au sein d’un projet. A noter que toute présentation purement commerciale ne sera pas retenue.

Contactez les organisateurs VISEO de l’EAUG France 2015 avec vos coordonnées et détails de votre sujet à l’adresse email This email address is being protected from spambots. You need JavaScript enabled to view it..

Enterprise Architect User Group (EAUG) - France, Sept. 2015

VISEO will host the first EAUG in France on Thursday, September 17th 2015. This Enterprise Architect User Group will be held in Paris at "27 quai Le Gallo - Boulogne-Billancourt" (underground and tram stations are located nearby).

This first edition will introduce talks and presentations in French on a wide array of topics including Enterprise Architecture, modelling IT and software applications, generating and validating documentation from the models, and Systems Engineering (MBSE).

Enterprise Architect add'ins will be shown in a dedicated area, where users and experts will be able to share their opinions and experiences on notations, languages, methodologies around a coffee, tea or other refreshment.

The full agenda is yet to be defined, with a priority on sharing project experiences in using Sparx Enterprise Architect. Hence this User Group is opened to any company, expert, or consultant who would like to share and talk about their experience with the Enterprise Architect user community.

Online registration will be available soon (please contact us on This email address is being protected from spambots. You need JavaScript enabled to view it. if you would like to be notified once registration is available).
VISEO operates as Sparx Systems main partner in France and has a member in the EAUG Steering Group (www.eausergroup.com).


French version:

VISEO organise le 17 Septembre 2015 le premier EAUG en France, User Group concernant l’outil de modélisation Enterprise Architect de Sparx Systems.  

Cette première édition comportera essentiellement des présentations en français et sera ouverte à des sujets aussi variés que l’architecture d’entreprise, la modélisation d’applications informatiques, l’ingénierie système à l’aide d’Enterprise Architect, ou encore à la génération et à la validation de documents à partir des modèles.

Des présentations d’add-ins sont prévues dans un espace dédié où nous pourrons également partager nos expériences autour d’un verre ou d’une tasse de café et confronter nos points de vue sur les notations, les méthodologies ou autres sujets d’intérêt. Des experts de l’outil et des méthodologies seront présents afin d'échanger notamment sur les bonnes pratiques.

Le programme détaillé n’est pas encore arrêté et nous souhaitons privilégier les retours d'expérience issus de projets plutôt que les présentations théoriques. C’est pourquoi nous demandons à toutes les entreprises intéressées souhaitant se joindre à la communauté francophone autour d’Enterprise Architect de nous proposer leurs sujets de présentation.

Si vous souhaitez assister en tant que visiteur, les modalités d’inscription seront bientôt communiquées. Vous pouvez vous contacter sur This email address is being protected from spambots. You need JavaScript enabled to view it. si vous souhaitez être notifié directement dès l'ouverture des inscriptions. En attendant retenez la date du 17 Septembre 2015 dans vos agendas.

VISEO est partenaire de Sparx Systems pour la France et membre du comité directeur de l’EAUG (eausergroup.com).

Tuesday, 10 February 2015 22:26

Enterprise Architect 12 Wireframing preview

Introduction

Enterprise Architect 12 is due to be released this year, with the RC2 currently available to download and test. Amongst its enhancements, I came across the new User Interface Wireframing support.

Wireframing lets you define a visual representation of a screen with its interface elements such as labels, fields, and buttons. Having defined several screens, a navigation model can built e.g. to specify the navigation from the login screen to the account summary screen via a “submit” user action.

Wireframing is intended to define User Interface diagrams that focus on functionality and help to obtain business validation upfront. Wireframing do not address rendering styles, colours, or graphics.

Enterprise Architect 12 Wireframing supports several mobile devices, such as iPhone smartphones, iPad tablets, and Android devices. Web site design is also supported.

Up to version 12, Enterprise Architect UI diagram involves an XP windows style which can be useful to provide UI illustrations. It is very good news that the next version of Enterprise Architect supports User Interface Models for mobile and web applications.

Wireframing diagram

The screenshot below shows the available Wireframing diagram types:

Note: “XP style” UI diagrams are still available from Extended > User Interface diagram type.

Below is an example of the Apple wireframing diagram toolbox, including most iPhone and iPad models (see screen types), as well as UI controls to create labels, fields, checkboxes, keyboard, switch, tab bar, etc.

The toolbox also includes Patterns to create screens with a predefined set of controls, such as the one illustrated below for an iPhone 5s:

 

When creating a new screen from the toolbox, Enterprise Architect lets you choose between the portrait and landscape mode, as illustrated below with an Android smartphone:

Traceability

So, why should you use Enterprise Architect to define your web or mobile app screens where there are plenty of UI design and prototyping tools out there? The answer is traceability; Enterprise Architect Wireframing diagrams let you build your User Interface model alongside requirements, analysis, design, data and other models. Associations can be created and maintained between UI widgets and requirements, use cases, classes, DB table columns, etc.

A mobile application for an online retailer has been used to produce the examples provided in this article, based on the following Enterprise Architect project structure.

The following use case diagram shows traceability between the analysis and requirements models (a use case realizes a requirement).

The following BPMN2.0 diagram has been created under the “Place an order” use case to specify its scenario. Each step (actor or system) is defined as an activity, some of which are linked to an active screen from the UI model.

These links make it possible to looks for the use cases where a screen is used, or to carry an impact analysis on the UI model when making modifications in a use case.

The following diagram illustrates the links from a wireframing UI screen to the analysis and implementation models.

In this example, the screen:

  • is involved in the “Place an order” use case;
  • fulfils the “REQ-001” requirement;
  • has fields which value is traced to business classes, including direct links to attributes (e.g. Post code is associated with Address.postCode business class);
  • has a Continue button which executes InvoiceService.submitInvoice interface method. 

This traceability enables a team to verify the impact in the design model when altering a business class, or a list of screen actions invoking a specific UI service implemented in a Java interface.

Navigation

Wireframing user interface diagrams can be used to specify navigation between the screens of an application or website.

Conclusion

The wireframing user interface diagrams delivered in Sparx Systems Enterprise Architect 12 are very easy to use and fulfil most UI specification needs for a web site or mobile application.

Wireframing can be applied before the implementation stage to obtain validation from the stakeholders. It can also be used to define the User Interface model and traceability links with other modelling elements, enabling the Project Manager and the entire team to control the impact between UI, business, functional, and design aspects of the project.

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.

Context

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.

Conclusion

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, www.speedbird9.com 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: www.smartusecase.com.

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: http://sparxcloud.co.uk/Example/oslc/qc/

With the following url, results are limited to « Chuck Wilson » author: http://sparxcloud.co.uk/Example/oslc/qc/?oslc.where=dcterms:creator=%22Chuck%20Wilson%22

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.

Conclusion

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: www.eausergroup.com.

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]umlchannel.com
  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
  64.  
  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]umlchannel.com 
  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"
  30.  
  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.

Page 3 of 5