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
- In a UML model, create a sequence diagram.
- Add lifelines to the sequence diagram.
- Specify that the lifelines represent UML actors, components,
or nodes in the model:
- Create UML actors, components, or nodes in the UML model
or import units from a topology into the UML model.
- In the sequence diagram, select a lifeline.
- In the Properties view, on the General tab,
click Select represents.
- 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.
- Add messages to the diagram to illustrate the interaction
between the lifelines.
- Save the UML model.
- Click .
- Click .
- Select the check box labeled Animate interaction
messages in topology diagrams.
- 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.
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.
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.