Enterprise Architect version 15.0

download
purchase

enzh-CNcsnlfrdehiiditkoplptruskessv

My Profile

Social Media Channels

facebook  twitter  youtube   linkedin

Tuesday, 30 July 2013 12:54

The Well Dressed Model

Seven ways to organise your EA models so that other people can understand them

Ian Mitchell, ian@eaDocX.com

  • If you have spent many hours creating a great EA Model, hopefully you want the rest of your organisation to use it as well. But how can you make it readable?
  • Or maybe have you just picked-up a model which you created a few years back, only to be baffled by your own work. What exactly was this model all about, and where has all that great stuff gone ?
  • Or perhaps you’ve inherited a model from someone else who isn’t available to tell you what’s in it. How are you supposed to sort out what’s complete and useful, from the ‘other stuff’?

Over the years, we’ve come across all of these several times, and have developed a few tricks to avoid them.

If you have more techniques for helping other people to understand your models, please email Ian at eaDocX dot com.

1         A Package is not a Bucket

The most important ‘thing’ in Enterprise Architect is definitely the Package. It’s also the simplest. Just a folder with stuff in it, right?

Wrong.

The Package or rather the family of Packages which you create, say more about your model than anything else. If you just use them as a bucket to put things, then you’re missing-out on a critical way to communicate the intent of your model.

Some rules for Packages:

  • Sensible names. It may seem amusing to call a package ‘new stuff’, but nobody else will ever look there to find anything. If it’s ‘new stuff which was invented in the meeting..’ then call it that. 
  • Descriptions. A Package without a description isn’t just half-dressed, it’s practically naked. There is always something you can say about what’s in the package, where it came from, whether it’s finished or not.
    I suggest that anyone who creates a package in a shared model and doesn’t add a description should buy the coffees for all of next week.
  • Authors. Enterprise Architect will make the Author of the Package the person who created it. But go further, and make the Author the Owner of the information in it. So, even if someone is totally confused at what’s in the package, they can always email the author…

2       Notes, notes, notes

I’ve been teaching UML and other modelling techniques for more than 15 years, so apologies to all former students for repeating this. If you’re in that select group, can you remember the most important UML (or BPMN, or SysML..) modelling construct ?

The Note.

The humble note.

They don’t cost anything, they never run out, and they can communicate more about whyyour diagrams look the way they do than anything else.

Add them to elements, to links, to anywhere you can think of. But make sure to keep them up-to-date: a diagram with misleading notes is worse than one with no notes at all.

3       Single-purpose Packages

If you’re going to follow the rules above, and describe what’s inside each package, then having one, or a small number, of different types of ‘thing’ in a folder is sensible: it’s easier to find things, and easier to write a quick description.

This also becomes important if you are going to document your model using a document generator – either RTF or eaDocX.

A Package with one type of thing in it can be documented as a simple table, with the Package name becoming a title for the table.

4       Different things get different stereotypes

The idea of the Stereotype is one of the key ideas of UML, which EA has extended to cover all the other model types it supports. So whether you’re creating SysML diagrams, BPMN business processes or Use Cases, you can use stereotypes.

So use them.

A stereotype is just a ‘special kind of’ thing. So if you have use cases which are sometimes complete (all scenarios filled-in) then make them <<fully dressed>>Use Cases, or if not <<partially dressed>> . So a reader finding one of these will know whether it will be completed or not: they know what to expect.

The same can be true of any other element. Using a stereotype can tell your readers what they are looking at.

Stereotyping also makes it easier for documentation tools like eaDocX to change how they format their outputs. For example, a <<fully dressed>> Use Case should print its scenarios, and highlight where they are missing – that’s an error. But <<partially dressed>>Use Cases don’t need to.

5        Status is everything, or Somewhere to Play

When you read a model, probably the most common problem is that you don’t know what the status of something is: a diagram, an element, or a whole package of the model.

Is this completed, signed-off and implemented, or just some ideas I had over coffee one day?

So using the EA ‘Status’ fields (with some sensible values) is really, really useful to readers.

But you can do more to help separate the ‘finished’ content from the ‘just thinking’ stuff.

Why not have an area of the model which is just a sandpit? Somewhere where modellers can try things out, and to which no standards apply. Readers are not encouraged to look in these packages. Everything is work-in-progress or incomplete.

Equally, the areas which are for ‘real’ content DO obey all the local rules: packages must have descriptions, only the approved stereotypes are used etc.

6       Public and Private diagrams

The great power of EA is that it allows us to create links between all kinds of elements, depending on what kind of problem we’re trying to solve.

There are several ways to create these links: the Relationship Matrix is a quick way, but diagrams are also very common. And this creates a problem for the reader.

Are they looking a ‘proper’ diagram, which they are supposed to understand, or is this a diagram which you just created to establish some relationships, and isn’t really for public use?

So get used to naming diagrams so that this is obvious, and to prevent accidental printing of these diagrams in documents.

Pick a naming convention for ‘do not print’ documents: we add ‘hidden’ in front of the document name. We’d like to use a diagram stereotype, but that doesn’t appear in the Project Browser. So ‘My untidy diagram’ becomes: ‘Hidden – my untidy diagram’. We also tick the box in the diagram properties to “Exclude image from RTF Documents”. Both the EA RTF generator and eaDocX will take this to mean ‘don’t print in any document’.

So now you’re free to create as many untidy diagrams as you like, and readers will know to ignore them.

7        Pick a meta-model, write it down, and stick to it

This final piece of advice is really a summary of all the others.

Each idea we’ve discussed above contributes to your meta-model.

If that sounds like a scary, super-technical idea, it isn’t.

All of your EA models already have a meta-model, whether you know it or not. The meta-model just says what kinds of ‘stuff’ is in your model.

  • What kinds of elements have you used? e.g Requirements and Use Cases, but not internal requirements,
  • How have you linked them together?  
  • What stereotypes have you used, and what does each one mean?
  • How have you used things like Element Tests, the Glossary, or Project Tasks?

..so not really complicated. The meta-model is just your local modelling standards.

If you want to find out what your meta-model is, use the eaDocX Model Expert. It will draw a diagram of all the element types, stereotypes and links in your model. Be prepared for a surprise! Big models can be complicated!

This is a good reason to make your meta-model clear and simple. Pick a small number of elements, stereotypes and links, and use them consistently.

Communicating the meta-model is critical: one which only you understand is no use. It MUST be written down, preferably in the model itself, and taught to all of your team.

AND kept up-to-date, as your modelling style evolves, as it will certainly do.

Published in White Papers

It is no coincidence that the package element in UML is represented by a folder icon, similar to directories in a file system Graphical User Interface (GUI).  Packages are used to organize the elements of a model just as folders are used to organize files.  The contents of a package are any kind of element that is part of a model, including other packages.  Beyond that description there's not much more information on how to use packages in the UML specification.  Since they are a general grouping thing, it is up to usage scenarios to suggest what the best practices are for using packages.  There are some practices that apply in most situations, and more that depend upon the modeling methodology or the purpose of the model.

First and foremost, use packages to organize your model, regardless of the model purpose.  Even the most trivial model quickly becomes unmanageable without some kind of organization.  There is no single correct way to organize a model.  A modeler may choose to organize around process or product or some combination of the two.   Second, use the package diagram to provide visualizations of that organization.   The model browser view below illustrates how even a simple model can begin to be confusing with no organization of the model elements.

 

 In addition to being able to gather like items together to allow modelers to focus their attention on relevant elements and make those elements easier to find in the browser, packages provide a namespace for the elements they contain.  Namespaces allow modelers to create unambiguous named references to each of the elements in a model.  This is useful in situations such as when a modeler is evolving a system and creating an as-is and a to-be system model.   It is natural to have elements named the same in each model.  In order to disambiguate elements with the same name, they can be placed in different packages so that the fully-qualified names are different.

Packages can be placed on a UML package diagram.  The modeler might choose to do this to present a high-level view of a model or to show relationships among the packages of elements.  Three different package diagrams representing the model organization shown above are presented here.  Each of these diagrams uses the optional diagram frame, showing the diagram type (pkg) and diagram name (Use Case View).  Note that although  the diagram and the package have the same name (Use Case View) this is not required.  In the first diagram, the two high-level packages are shown.  As with many other modeling situations, only the details we need are presented, and the details of the package contents are elided.

 

In the second diagram, the packages contained in the Actors package are shown.  The labels on the Human and Non-Human package describe the namespace of the containing package.  The containment relationship also serves to describe the namespace.  In this example, the fully qualified name of the Actor Operator is Use Case View::Actors::Human::Operator.

 

In the third diagram, the contents of the packages are shown embedded in the package elements.  This representation is the third presentation option found in the UML specification.

Your package diagrams will in all likelihood be some combination of each of these styles, as will your choice of organizing principles.  Choose the one that is appropriate for its intended use. 

 

Published in White Papers