Topology execution
General information
For an interaction diagram, the topology units must be connected to interaction lifelines. For an activity diagram, the topology units must be connected to an activity partition. For BPMN, the process and service tasks are linked to UML interfaces and operations which are connected to topology units.
- Constraint links: To be animated, a constraint link must have either an Application Communication or Network Communication constraint.
- Dependency links
- Hosting links
Interaction animations
Sequence diagrams
show how lifelines interact with each other by exchanging messages.
In a topology, messages are shown on deploy links that connect units
to corresponding lifelines. When a message is sent from one lifeline
to another, the message is shown in the topology diagram on the deploy
link that represent a communication path between the sending and receiving
unit, as shown in the following figure.
Note
that the text for the message decorator text box in the topology diagram
is the same as in the sequence diagram. When the message is received
by a lifeline, the message transfer is animated by moving the message
text box in the topology diagram along the deploy link, from the sending
to the receiving unit. The message text box then stays at the receiving
end of the deploy link, indicating that the message is about to be
received, as in the following figure.
Sometimes the topology units that correspond to the sending and receiving lifelines are not directly connected by a deploy link. In that case, the simulation searches for a deploy link that connects units containing the sending and receiving unit. If a parent deploy link is found, the message decorator moves along that link during animation.
Activity animations
Activity diagrams show
how tokens flow through an activity, which causes activity nodes to
execute. In a topology, tokens are shown on deploy links that connect
units that are linked to activity partitions between which the token
flows. An activity edge that moves from a source node in one partition
to a target node in another partition represents a communication path
between topology units that correspond to those partitions. This type
of activity edge is called an inter-partition edge, as opposed to
an intra-partition activity edge, because both the source and target
nodes are not in the same partition, as shown in the following figure.

When at least one token resides on an inter-partition
edge, the tokens are visualized in the topology diagram on the deploy
link that represent a communication path between the source and target
units, as shown in the following diagram. 
Tokens are represented by a green text box in the topology diagram. The text in the box is the name of the inter-partition activity edge. If the token does not have a name, the text is S->T , where S is the name of the source node and T is the name of the target node. If source and target names are not available, the metaclass name for that node is used instead.
If an edge has multiple tokens, the token count is shown in parentheses. Tokens on intra-partition activity edges are not shown in the topology diagram. When one or many tokens flow across an inter-partition edge, the simulation is shown in the topology diagram by moving the text box along the deploy link. It is possible that only some of the tokens that reside on the activity edge are consumed by the target activity node. The decreased token count for remaining tokens is shown in the text box at the source end of the deploy link.
In contrast to a message text box for interaction execution, a token text box for activity execution does not stay on the target end of the deploy link when it moves along it. The target activity node consumes the tokens directly, prior to its own execution. However, consumption of some tokens leads to new tokens being offered to outgoing activity edges. If those edges are inter-partition edges, they are visualized in the topology diagram on the corresponding deploy links. Similar to executing interactions, animations also occur on deploy links between units that contain the sending and receiving units.
The partitions in a simulated activity should either represent a property or a type. If a partition represents some another kind of element, animation does not occur for nodes in that partition.
A BPMN service task can be linked to a UML operation. The type of operation can then be related to a topology unit. A BPMN process can also be linked to a UML interface, which can also be related to a topology unit.
When the links are created between the BPMN model, UML operation or interface and the topology units, you can visualize the topology diagram the communication between the components that represent the processes and service tasks. The decorator in the topology diagram is a yellow rectangle with text, as shown in the following diagram.

You can control decorators in topology diagrams in the topology animation preference page.
BPMN topology example
Here is an example of a BPMN model which can be connected to a topology diagram for animation.

Note that the lanes are not connected to UML and have no impact on the simulation. The process is linked to a UML interface P, and the service tasks are linked to UML operations which are defined in UML interfaces I and J:

The interfaces are realized by three components Comp I, Comp J and Comp P.

Note that Comp I realizes I indirectly by inheriting a class C which realizes I, and Comp P realizes P through a port. Now consider a topology diagram with units that represent the components Comp I, Comp J, Comp P respectively:

When we simulate the BPMN process and a service task is next to execute, the operation call decorator displays on the corresponding link in the topology diagram. The text shown in the decorator is the name of the service task. The service task executes and the green box moves across the topology link to illustrate that the service task is called. The tooltip of the decorator shows the name of the service task followed by the operation name within parenthesis.
The following diagram displays what the topology diagram will look like when the ICall service task is about to execute.

If the preference for showing historic message lines is enabled there will also be historic message lines shown between these nodes afterwards. The historic operation call messages also appear in the Historic Messages view. Their kind is set to Operation Call.
