UML & SysML modelling languages

Expertise and blog articles on UML, SysML, and Enterprise Architect modelling tool

version francaiseTwitterVideos UMLChannel SparxSystems EA YouTubeLinkedIn

sparxsystems enterprise architectEnterprise 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.
 FindPackageBaselines-search-enterprise-architect-sparx

05/2018 update: a built-in search module is available from EA 13 (common searches > find baselines).

Defining a business process with BPMN2 involves using several elements from this modelling notation including activities, gateways, events, pools, lanes, and data objects. There is sometimes a need to change the type of an element, e.g. a user activity to a service activity, a parallel gateway to an exclusive gateway, a message start event to a timer...

Having to start over with a new element of the right type is not ideal especially when the existing element is associated with others, documented, and completed with BPMN2 properties (e.g. set as Catch or Throw). This article provides a Sparx Enterprise Architect hint to update and convert a BPMN element in just a few clicks using the toolbox.

 

sparx enterprise architect hint apply element type

 

sparxsystems enterprise architect

During a team review of our Enterprise Architect project, we needed to find the controlled package matching an XML file located in the SVN repository (the EA project was set up on a SQL Server database, coupled with an SVN repository).

This article illustrates a user defined search created in Enterprise Architect, named FindControlledPackageFromFile, aimed at fulfilling the following needs:

  • Determine if an XML File identified in the SVN repository is still associated with a controlled package,
  • or find the controlled package that's associated with an XML file.

Sparx Enterprise Architect search sql results

When manipulating elements from your project browser, there is sometimes a need to move an element from a package to another. To achieve this, users can select the element via a left click, holding down the button while dragging the element to the target package. Once the mouse button is released, the element is moved to the selected package. It is the same process as moving files using the Windows Explorer.

However when the project contains numerous packages, diagrams and elements, this process can be cumbersome. Hence the easier option is to cut and paste the element from within Enterprise Architect Project Browser : run a right click on the element to move and select Copy/paste > Cut or use the keyboard shortcut Ctrl-X. Then select the target package and run a right click > Copy/paste > paste, or use the keyboard shortcut Ctrl-C.

This hint may sound obvious however users are often unaware of the availability of the cut/paste and copy/paste features in the Project Browser.

enterprise architect hint on project transfer error EAP to DBMS

I recently had to transfer an Enterprise Architect project from a local EAP file to a MySQL database for sharing purposes. To do so, I opened the menu Tools > Data Management > Project Transfer, and selected the option "EAP to DBMS".

I came across a Lost Connection error: 

[MySQL][ODBC 5.2(w) Driver][mysqld-5.6.-16]Lost connection to MySQL server during query [Select * from t_document] field: docdate.
Press OK to continue to next row (this record will be lost). Cancel to abort.

As I thoroughly documented the BPMN activities within business processes using Enterprise Architect Linked Documents (build-in Word processor), I assumed that all these linked documents involved a rather large amount of data, leading to such error.

Update 2/11/2015: this hint also works with the following error message.

[MySQL][ODBC 5.1 Driver][mysqld-5.6.27-log]Got a packet bigger than 'max_allowed_packet' bytes. Context: select * from t_image

This article explains how to fix it.

 

When working onto a diagram in Sparx Enterprise Architect, a contextual toolbox is displayed and available to use. A contextual toolbox means that the displayed toolbox matches the type of the opened diagram. For instance if a UML class diagram is created or opened, the Class toolbox is displayed, providing access to classes, packages, interfaces, etc.
Enterprise Architect makes it possible to change this toolbox via the Toolbox's "More tools" menu :

sparx ea more tools

Note : once this class diagram is closed, the toolbox selection is lost, i.e. the contextual toolbox (class) will be displayed next time this diagram is opened.


In some cases, it can be useful to display additional toolboxes for any type of diagram. Enterprise Architect makes it possible via the option More tools > Set Toolbox Visibility, where it lets you enable additional toolboxes:

sparx enterprise architect visible toolbox pagesIn the example below :

  • A use case diagram has been opened, hence the use case toolbox is displayed.
  • The requirements toolbox has been enabled via the Set Toolbox Visibility command (see previous screenshot), so it is displayed below the use case toolbox:

sparxsystems enterprise architect toolbox default

 

Sparx 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 lack of attractiveness, prompting the need for a suitable colour scheme and font.

This article deals with two topics :

  • Highlights the strength of Enterprise Architect as a modelling project versus that of a drawing tools;
  • Applying visual styles onto elements to improve the look and feel of your diagrams.

 

sparx enterprise architect diagram visual 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+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.

This article describes the use of UML Patterns in EA.

When creating classes in EA without the need to define any attribute or operation, the class is rendered without any compartment. This rendering can be an issue for some users, and as such EA lets you change that through the element's display properties in a given diagram.

To do so, right click on the class from your diagram, select "Feature and Compartment Visibility", and enable "structure compartment". You should get the result illustrated as follows:

use of structured compartment in ea

This is a limited solution since it only works on the current diagram, and EA doesn't let you apply this option onto a selection of classes.

The "Properties" view can be used to review or update a number of properties for an element, such as a class, interface, use case, actor... that has been selected from the current diagram or the Project Browser. These properties include the name, alias, stereotype, etc.

This view also gives you access to a number of shortcuts from the toolbar, illustrated in this article.

Sparx Enterprise Architect Properties shortcuts view

StartPrev12NextEnd
Page 1 of 2