Creating a UML sequence diagram to be the basis for a topology animation

Sequence diagrams and the connections in them can form the basis for a topology animation. The sequence diagram must have lifelines and connections that you can import into a topology.

Procedure

  1. In a UML model, create a sequence diagram.
  2. Add lifelines to the sequence diagram.
  3. Specify that the lifelines represent UML actors, components, or nodes in the model:
    1. Create UML actors, components, or nodes in the UML model or import units from a topology into the UML model.
      Note: You can import only certain types of UML elements into topologies. Therefore, you must use these types of elements in the sequence diagram. For more information, see Importing elements from UML models into topologies. You can also import units from a topology into the UML model; see Importing units from topologies into UML models.
    2. In the sequence diagram, select a lifeline.
    3. In the Properties view, on the General tab, click Select represents.
    4. Select a UML actor, component, or node and click OK.
    As a shortcut, you can also drag a UML actor, component, or node from the Project Explorer view directly onto a lifeline in the sequence diagram. For more information about working with sequence diagrams, see Sequence diagrams.
  4. Add messages to the diagram to illustrate the interaction between the lifelines.
  5. Save the UML model.
  6. Click Window > Preferences.
  7. Click Model Execution > Animation > Topology Animation.
  8. Select the check box labeled Animate interaction messages in topology diagrams.
  9. Click OK.

Example

The following figure is a simple example of a sequence diagram that can be the basis for a topology animation. In this sequence diagram, the types of the lifelines are set to UML components. The messages between the lifelines specify how the components interact, and this interaction provides the information for the animation.
A sample sequence diagram that is composed of UML components connected by messages
You can import the UML components into a topology an animate the deployment scenario for those components. The following figure shows a simple example of a logical model in a topology. In this topology, the components from the sequence diagram are hosted on nodes and locations, which represent the infrastructure on which the modeled application runs.
A sample topology in which the components from the UML model are hosted on logical infrastructure units

What to do next

Now you can animate a topology based on the information in the sequence diagram, as described in Animating and simulating topologies through UML and BPMN diagrams.

Feedback