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.
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.
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.
Tip: Use the note shape to describe classes or information about the implementation detail.
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:
- 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.
- 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.
- Click an insertion triangle on either side of the class shape to insert a new member at the highlighted position.
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.
Show the template parameter or stereotype by selecting the class shape, then using the right click menu to show these properties.
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).
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.
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.
Use the activation shape to show when a lifeline is initiated. Drop this shape onto the lifeline and connect messages to it.
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.
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:
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.