Creating a UML Sequence Diagram

Sequence diagrams are a form of interaction diagram. Each sequence diagram captures the behavior of a single scenario, showing objects and the messages that pass between them. You can create a sequence diagram by using the UML sequence component palette or through the debugger. After you have created the diagram, you can start a tracer that will step through each of the activations and messages, showing you the sequence.

To create a sequence diagram using the UML sequence component palette:

  1. Create a new sequence diagram using the UML Sequence DiagramUML sequence diagram icon in the New Gallery. For more information, see Create a New Diagram.
  2. Create the elements you require on the diagram using the UML sequence component palette.

    Object lifeline Object Lifeline

    Message Message - for synchronous messages and related activations

    Creation message Creation Message - for messages that create an object

    Stop message Stop Message - for messages that indicate that an object is no longer needed

    Return Return - for return messages

    Asynchronous message Async Message - for asynchronous messages and related activations

For more information on creating nodes and connectors on a diagram, see Creating Nodes on a Diagram and Connecting Nodes on a Diagram.

Tip: You can also annotate your diagram by creating and attaching notes to diagram elements, and adding URL links to other locations such as files or web locations. For more information, see Annotating a Diagram.

To create a sequence diagram using the debugger:

  1. Create a new sequence diagram using the UML Sequence Diagram UML sequence diagram  icon in the New Gallery. For more information, see Create a New Diagram. If you do not start with an empty diagram, you will be warned that the diagram will be cleared when you begin to use the debugger.
  2. Connect to the debugger by opening the context menu and selecting Connect to Debugger.
  3. Begin the debugger for your code. The sequence model will be populated with elements as you step through the code. A breakpoint will cause the diagram to be reset.
  4. You can disconnect from the debugger at any time by opening the context menu and selecting Disconnect from Debugger. This will preserve the contents of the sequence diagram.

To start the sequence tracer:


About UML Sequence Modeling
Getting Started with UML Sequence Modeling
How to Read a UML Sequence Diagram