Book a Demo
Prev Next

Publish a Pattern

To publish a Design Pattern you first must model the Pattern as a diagram within Enterprise Architect. This example diagram was created from an example in the GoF book Design Patterns - Elements of Reusable Object-Oriented Software by Gamma et al.

Decorator Pattern, an example of a Gang Of Four Pattern diagram



With diagram open:

Specialize > Technologies > Publish Technology > Publish Diagram as Pattern

Define the Pattern File



See also

Pattern Name

Type the Pattern name.


Type a directory path and .XML filename to contain the published Pattern.


Type the Category under which the Pattern should be listed in 'Patterns' (required).


Type the Pattern version number.


Type any notes on the Pattern.


Select the appropriate checkboxes to select the actions for the elements that are contained in the Pattern; these actions are performed when the Pattern is used.

The available actions are:

  • Create: Creates the Pattern element directly without modification
  • Merge: Merges the Pattern element with an existing element, enabling the existing element to take on the role of the selected Pattern element
  • Instance: Creates the Pattern element as an instance of an existing element
  • Type: Creates the Pattern element types as an existing element

If your Pattern includes an Object element, you would use 'Instance' to set the classifier of the Object to one of the Classes in the diagram onto which you are dropping the Pattern.

If your Pattern includes a Property (Port or Part) you would use 'Type' to set the type of the Property to one of the Classes in the diagram onto which you are dropping the Pattern.

Use a Pattern


Click on this button twice to publish the Pattern.

Once published, you can load the Pattern into Enterprise Architect, into the 'Resources' tab of the Browser window.

Import a Model Pattern


  • In the Corporate, Unified and Ultimate Editions of Enterprise Architect, if security is enabled you must have 'Manage Diagrams' permission to publish a diagram as a Pattern
  • If your source diagram contains information flows, the 'Information Items Conveyed' and 'Information Flows Realized' data is not copied into the Pattern
  • To change the name of one of the elements, double-click on the element to display the 'Edit' dialog; from this dialog you can also add comments detailing the element's purpose
  • Patterns can not be published for Sequence diagrams