Back
Visio

Professional, flexible & beautiful UML content

In the new Visio, we have re-envisioned our Unified Modeling Language (UML) templates in a fresh, modern way. In an earlier post, we talked about our whole new approach to the UML templates. We updated our five most popular UML diagrams, with all new shapes to make it easier and faster to create beautiful, professional diagrams. Our new UML templates allow you to create class, sequence, state machine, activity and use case diagrams that match the UML 2.4 standard.  

UML Diagrams: Activity, Class, Sequence, State Machine and Use Case

The new UML templates focus on a freeform, on-canvas experience. Each template takes advantage of the full capabilities of Visio, including shape effects and themes, as well as collaboration and commenting to share your diagrams across your organization.

In this article we’ll introduce each of the new UML diagrams and present a few tips about using the new model.

Class Diagram

Visio UML Class diagram

The UML Class diagram template lets you build static structure diagrams.  These diagrams can be used to develop a model of the classes and objects in your software program.  Combined with the commenting and collaboration features, it’s now easy to work with coworkers and review software designs.

This diagram features the basic class, member and divider shapes as the foundation of object-oriented classes.  Special interface and enumeration shapes are also available. A package shape can be added to visually group classes into an expanded package or collapsed package.

Relationships between classes, interfaces and enumerations can be represented using the seven relationship connectors: inheritance, interface realization, association, directed association, aggregation, dependency and composition.  If you need to change the relationship type after the connector is on the canvas, use the right-click menu to select one of the other types.  Multiplicity shows the quantity relationship between the objects.  You can use the right click menu to show the multiplicity text boxes.  Edit these text boxes to represent the multiplicity of the relationship.

Visio UML Class diagram - Show multiplicity

Tip: Use the note shape to describe classes or information about the implementation detail. 

Add a note to a class diagram shape

The class shape uses the list data structure to organize members and functions in each class.  (This model is very similar in the database shapes.)  New members can be added to classes using the three methods:

  1. Add or remove members by dragging them in or out of the list shape. A green highlight rectangle appears around the class shape to denote membership, and an orange insertion bar indicates the specific position that a new member will occupy in the class. 
  2. Select a member shape already in the class, then use the right click menu to insert a member shape before or after the selected shape.
  3. Click an insertion triangle on either side of the class shape to insert a new member at the highlighted position. 

Insert a member to a UML class shape

Use the separator shape to divide data members and functions within your class.  To resize, use the yellow control handle on the right side.  This will resize the class shape and all members together.

Resize a UML class shape

Show the template parameter or stereotype by selecting the class shape, then using the right click menu to show these properties.

Stereotype and parameter on class shapes

All UML diagrams are fully themeable.  You can easily adjust the style and tone of the diagram by changing the theme. The class shapes have an additional feature: embellishment levels that can be changed using themes. Each embellishment level has a different style from traditional and conservative (low) to modern and fun (high).

Embellishment levels on UML class shapes

Sequence Diagram

Visio UML Sequence diagram

The UML Sequence diagram models interactions and events in a process arranged in a time sequence. It can be used to show steps in a process by different actors or it can show how data passes between objects in a system. 

Use an actor or object lifeline to represent participants in the system.  Each lifeline contains a set of connection points where messages can be connected to each actor or object.

Lifeline shape in UML Sequence diagram

There are four types of message connectors in the shapes pane: message, return message, self message and asynchronous message.

Tip: Use the right click menu to change a message type between synchronous and asynchronous.  A message can become a self message if the origin and destination is the same lifeline.

Use fragment shapes to encapsulate loops, optional fragments, alternative blocks or sub processes. 

Fragment shape in UML Sequence diagram

Use the activation shape to show when a lifeline is initiated.  Drop this shape onto the lifeline and connect messages to it.

Actor lifeline in UML Sequence diagram


State Machine

Visio UML State Machine

Use the UML state machine diagram to show the sequence of states an object goes through during its lifetime. Model the state with one of four state shapes. Use the initial state and final state to show the beginning and end of the lifecycle.  Use choice shapes to show transitions between states.  

Tip: Add text to connector shapes to label states and conditions.

Add text to connectors in Visio

Activity Diagram

 Visio UML Activity diagram

A UML activity diagram is a special case of a state chart diagram in which all of the states are action states and the transitions are triggered by the completion of actions in the source state. Use an activity diagram to describe the internal behavior of a method and represent a flow driven by internally generated actions. 

The new activity diagram template uses the cross-functional flowchart shapes to show each participant in the system. The swim lanes will resize with contents and dynamically adjust when a new lane is added.

Use the standard UML notation to model the process from initial node to final node.  The new shapes make it easier to stay organized and create great-looking, easy-to-follow diagrams.


Tip: Use auto connect to add new steps in the process:

Use auto connect with Visio

 Use Case

 

Visio UML Use Case diagram

Apply UML Use Case diagrams to model interactions within and between subsystems.  Connect the actor shape to use case shapes using the auto connect tool.  The connectors describe the relationship between the actor and use case shapes.  There are five connectors: association, dependency, generalization, include and exclude.  The subsystem shape visually represents the use cases within it.

Tip: Use Find Shape to add icons for different actors in the system.  See the Find Shape help article for more information about using this feature. In the example above, a bank shape replaced the actor shape.

Benefits of the new shapes

With the new Visio UML templates, you can quickly create beautiful professional diagrams that show class, sequence, state machine, activity, and use case and also adhere to the UML 2.4 standard. The templates allow you to easily share and review diagrams of complex systems. The new diagrams are more extensible and flexible, and now you can apply the powerful features of the Visio engine to UML models, such as auto connect, replace shape and commenting.