Enterprise Architect

This tutorial refers to Enterprise Architect (EA) version 16.1. It is highly recommended to use the PCs from TUM to conduct the tutorial since EA version 16.1 is installed on these PCs.

Enterprise Architect (EA) is a computer-aided software engineering tool from the company Sparx Systems that can be used, for example, to create software systems or data models that are to be used in the geospatial information domain or to model arbitrary processes. Modelling is done based on a UML-compliant representation, since EA always uses the most recent UML specification.

The Software license

Activation

Before using Enterprise Architect (EA) for the first time, the licence needs to be activated personally by every user. Licensing takes place per computer, i.e., when using a different computer next time, you have to repeat the licensing process again.

For licensing, please perform the following steps:

  1. Start EA: Either via the Windows start menu, or if EA is not listed there, directly run the application EA.exe (or EA, if the file extension is not shown) in the folder C:Programme (x86)Sparx SystemsEA.

  2. The window “License Management” opens: a. Click on the “Add Key” button.

    1. Select the tab “Get Shared Key”.

    2. In the field “Shared Keystore”, click on the “…” button.

    3. Select the option “Sparx Keystore Server” and enter the IP address 10.162.246.29 in the field “Server Address”.

    4. Click on the “OK” button.

    5. In the field “Select a Product”, click on the product name “EA Academic Edition”.

    6. Click on the “OK” button.

    7. Click on the “Close” button.

    8. Now you need to activate the software:

      • In the field “Enter Activation Code” add “Q7WL”

      • Check the box for “I accept the terms in the license agreement”

    9. Click on the “OK” button.

  3. EA opens and is now ready to be used. Wizard windows which might appear can be ignored via the “Cancel” button

Note

The individual steps are also explained on the Sparx systems website here

Warning

Please release your keys after your session as we have a limited number of floating licenses and other students might require them.

Deactivation / Release

  • Click on Start > Help > “Register and manage your key”.

../../_images/image118.png
  • A window will pop-up. Select your key and click “Release Key”

../../_images/image119.png
  • Please make sure to release your key and be considerate towards your classmates who might need the licenses.

    ../../_images/image117.png

Overview of the user interface

An EA project contains models, packages, and diagrams. These elements are displayed in a hierarchical structure in the “Project Browser” (see figure). In the “Diagram View”, individual parts of the model can be visualised and with the “Toolbox” they can be edited.

../../_images/image11.png

In case the windows are missing, you can access

  • Toolbox: Toolbox option from the Design tab.

  • Project Browser: Design –> Portals. In the window, choose the Project Browser from the options under Explore tab.

Additonal tutorials and help

Tutorials and help about EA can be found on the Sparx Systems website

Note

Furthermore, the “Learning Center” offers quick access to context-sensitive assistance. The “Learning Center” can be accessed via the shortcut Alt + F1

Understanding the Project Structure

The follwing figure briefly explains the project stucture.

../../_images/image12.png

Working in the Project

The following is a step-by-step explanation on how to create, modify and work within the EA projects

Creating a new project

  • Select “Create New” from the Start Page in the Diagram View (OR) alternatively, select image0 > New Project as shown in the image below.

    ../../_images/image13.png
  • Give the new file a name and save it to your choice of directory. Once created, the file is visible in the Open Projects tab under Recent on the start page.

  • Click the newly created project. You will be able to see that a Model is added in the project browser.

    ../../_images/image14.png
  • Additional options -> integrated patters, diagram types, etc. can be found in the other tabs in the start page.

    • Create from patterns -> you can choose the type of diagram from existing templates depending on the type of diagram you are trying to model.

    • Add Diagrams -> Use this to add diagram to the diagram to your model.

Creating a Diagram

Once the model is created, go to the Start Page > Create from Pattern > Select the diagram of choice.

Creating a Package Diagram

  • Start Page > Create from Pattern > Select Starter Class Diagram.

  • The diagram is added to the browser with a basic outline, some sample packages and the package diagram.

    ../../_images/image15.png
  • Click on the ‘Starter Package Diagram’ in the project tree browser to open.

    ../../_images/image16.png

    Note

    To add elements to the package diagram view, you use the toolbox to drag packages, elements, relationships, etc. and use the project browser to modify/delete the elements in your diagram.

  • Each package consists of multiple classes and class diagrams.

Adding classes to the Packages

  • Use the Add Diagram tab from the Start Page. In the Add Diagram tab, select

    1. the package to which you would like to add the class

    2. Choose Type of diagram > Class Diagram in this instance and click create diagram

    ../../_images/image17.png
  • Open the diagram ‘Package A’ from the project Browser.

    ../../_images/image18.png
  • You can add elements from the toolbox as explained in the note above.

Adding relationships, multiplicities

  • Add relationships between the classes using the options given in the tab Class Relationships in the toolbox. Once you add relationships, you can double-click on the relationship and add a name to it. Roles, Multiplicity and Constraints can also be added via this window (indicated below).

    ../../_images/image19.png

Adding attributes

  • Further attributes can be added to the class. Right click on the class in the Project Browser > Select feature > Add attributes. Alternatively, you can click on the class in the diagram window, use F9/Fn+F9 to open the feature window instead of right click.

  • In this panel, you can add attributes, set their scope, define the data type etc.

    ../../_images/image110.png

Adding OCL Constraints

  • OCL constraints can be added to the classes. Right click on the class > Properties > Select properties > Constraints.

    ../../_images/image111.png

Note

Constraints must begin with ‘inv:’ in enterprise architect. They would not be valid otherwise.

Deleting elements

  • Elements can be deleted from the diagram view: Select elements and press delete (OR) Right-click on element and select Delete.

Note

Elements are only shown as links in the diagram view. A class that is deleted in the diagram view is still present in the model itself and is also visible in the Project Browser. To permanently remove an object, it must be deleted in the Project Browser > right-click on the object to be deleted and select Delete.

Moving elements between packages

  • If you want to move an element to another package in the Project Browser, the connections to other elements are retained. Select the element in the Project Browser and move it to the desired package using drag & drop.

Sorting elements in a package

  • Elements in a package can be sorted as per the user choice. Select the desired item and use the up/down arrows in the Project Browser toolbar to move it (shown in figure below).

    ../../_images/image112.png

Tip

You need not always create a package diagram and then classes within. This is a good practise when you have a large amount of feature and feature attributes which are interrelated. In general, use a class diagram directly if you do not have too many classes (shown below)

../../_images/image113.png

Advanced Concepts

XMI files

XML Metadata Interchange (XMI), defined by the OMG and based on XML, is an open standard file format that enables the interchange of model information between models and tools. Enterprise Architect uses XMI as a method of importing and exporting model specifications between different UML Packages, Enterprise Architect projects and other tools that support XMI. More about XMI in EA can be found here

For example, if the ISO191xx standards are to be integrated into the model, they can be imported as XMI files. The Harmonized Model Management Group (HMMG) offers XMI files for the ISO191xx standards on the website

To import the XMI files to EA project:

  • Download desired XMI file.

  • Select the Publish tab > Import option > XMI file.

  • Find the name of the XMI file under “Filename” and click “Import”

    ../../_images/image114.png

UML Profiles in EA

UML Profiles provide a generic extension mechanism for building UML models in particular domains. They are based on additional Stereotypes and Tagged values that are applied to Elements, Attributes, Methods, Links, Link Ends and more. A profile is a collection of such extensions that together describe some particular modeling problem and facilitate modeling constructs in that domain.

To add UML profiles to EA project:

  • Resources window (Project Browser) > UML Profiles

    ../../_images/image115.png
  • The imported profile is now displayed in the Resources window below “UML Profiles”.

Tip

If the Resources window is not available, it can be opened in the menu bar via Project tab > Resources or by pressing Alt+6

Inserting stereotypes into UML Diagrams

Packages, classes, attributes, and other UML elements can be stereotyped. There are two possibilities how stereotypes can be added to UML elements.

Possibility 1

  • A stereotype is added via the Properties window of the corresponding UML element. For classes, for example, the Properties window can be opened by right-clicking on the class > “Properties…”.

  • In the Properties window, click the button “…” next to “Stereotype” > A new window for selecting the desired stereotype opens (see Figure below) >.

  • The previously imported profile must now be selected under “Profile” > All stereotypes that can be applied to the UML element are then displayed > Select the desired stereotype > Click “OK” > The stereotype is now displayed in the properties window > Click “OK” again > The UML element in the diagram contains now the selected stereotype.

    ../../_images/image116.png

Possibility 2

  • You can drag a stereotype directly from the Resources window into the diagram. This possibility is useful, when a UML element is not yet present in the diagram, but is to be inserted into the diagram newly. In this way, the stereotype is automatically assigned to the UML element and the steps from possibility 1 are not required.

  • Example: A class with the stereotype “«FeatureType»” is to be modelled

    • According to possibility 1, you first need to add the class to the diagram, afterwards you can add the stereotype to the class via the Properties window.

    • According to possibility 2, you simply drag the stereotype «FeatureType» from the Resources window into the diagram. This automatically inserts a class into the diagram that already contains the stereotype «FeatureType». In addition, the properties window of the class opens automatically so that further adjustments can be made, such as changing the class name