Enterprise Architect version 15.2



My Profile

Social Media Channels

facebook  twitter  youtube   linkedin

Wednesday, 18 May 2011 10:44

UML Design Patterns

Written by
Rate this item
(0 votes)



Users of Enterprise Architect may be aware of the use of “Gang of Four” Design Patterns (Gamma et al) in the use of software designs and the support that Enterprise Architect provides for using these “Gang of Four” patterns.

Enterprise Architect also provides facilities for modellers to create and share their own design patterns. Users of Enterprise Architect may be under the impression that creating and sharing your own patterns is restricted to UML class diagrams however this is not the case.

This tutorial presents an illustration of creating, using and distributing a Business Process Workflow pattern using BPMN 1.1

Business Workflow Patterns

The research work of Professor van der Aalst has resulted in the identification of 21 basic workflow patterns that describe the behaviour of business processes.

These patterns are divided into the following categories:

  1. Basic Control Flow Patterns
  2. Advanced Branching and Synchronization Patterns
  3. Structural Patterns
  4. Multiple Instance Patterns
  5. State-based Patterns
  6. Cancellation Patterns

However you are free to create your own modelling patterns.

For the purpose of this newsletter, I will describe the following pattern, which I will refer to as “Parallel Process Error Propagation”. This pattern is illustrated below:

This workflow patterns ensures that if an exception occurs, then this is handled by a common activity.

Creating the Pattern

To create your own pattern, you must first model the pattern using a diagram from your chosen notation (in this case a BPMN 1.1 Business Process Model Diagram). I would recommend that ALL elements are named so identification within the pattern is made much easier. So the pattern can be maintained I recommend that a separate Enterprise Architect project is used to model your patterns.

The diagram created must now be saved as a UML Pattern using the following steps:

  1. Select Diagram | Save UML Pattern…from the main menu. The following dialog displays

  2. Complete the dialog as follows:
    1. In the Pattern Name: field enter a name to identify your pattern
    2. In the Filename field, enter a directory path and filename in which to save the pattern
    3. In the Category field, enter a name under which your pattern will appear in the UML Patterns section in the Resources view
    4. In the Version field enter any desired version number and in the Notes field enter a description of your pattern
    5. Complete a selection for the actions that are available when the pattern is used
      1. Create: creates the pattern directly adding new elements to your model
      2. Merge: Uses existing elements in your model and assembles them into your pattern (refer to Limitations later in this newsletter)
      3. Instance and Role are only where Object, Ports or Parts are used within your pattern
    6. You can also enter a comment for each element in your pattern to give some guidance as to its purpose within the pattern

      The illustration below shows a typical completion of the UML Pattern dialog


  3. After completing the dialog click OK to save your pattern

Importing the Pattern

In order to use your pattern, it must be imported into you modelling project:

  1. Select the Resources window (if this is not visible, then use the View menu to select the Resources view)
  2. Right-click on the UML Patterns node, and select Import UML Pattern
  3. Navigate to the file created when you saved your Pattern
  4. Click Open to complete the import process

If all has gone well, you should see you pattern in the Resources view as shown below:

Using the Pattern

To use your newly imported pattern, perform the following steps:

  1. Create a new diagram that matches the type used when the pattern was first created (for this newsletter, this would be a BPMN 1.1 Business Process Model
  2. Using the Resources view, locate the pattern and Drag and drop the pattern onto your diagram, the following dialog displays:


  3. Assuming that you wish to Create a new pattern, then for each element in the pattern click the … button and enter a new name (which can be blank) for your element. A typical example is shown below:


  4. Click OK and your pattern should appear on your diagram using the names you entered in the dialog. This is shown below:


(Note as the labels for the error intermediate event were hidden in the pattern, they are also hidden in the above diagram)


When creating patterns based upon PURE UML diagrams then all features work without fault. However it is important to note that basing a pattern on a UML Profile (which BPMN is) then the Merge option does not work, therefore for BPMN patterns it is not possible (currently) to use existing BPMN elements and assemble them into a pattern.


In this tutorial, we have described how create and use a pattern based upon a modelling notation other than UML.

You can read more articles like this on our blog.

Read 9404 times Last modified on Wednesday, 27 January 2016 22:59

Sam Nice

Dunstan Thomas Consulting

More in this category: Colour your Knowledge »
Login to post comments