Chapter 5 Building Dynamic Diagrams


Transitions

A transition is an oriented link between states or activities, indicating that an element in one state or activity can enter another state or activity when an event occurs (and if a guard condition is satisfied, when there is one). The expression commonly used in this case is that a transition is fired.

A transition can be created in the following diagrams:

Note   Dragging a transition to a different object
You can change the object at either end of a transition by clicking the transition to select it, holding the ctrl key down, and dragging one of the attach points to a different object.

The following rules apply to transitions:

Note   Merging models
When transitions are compared and merged by the Merge Model feature, they are matched by trigger event first, and then by their calculated name. When two transitions match, the trigger actions automatically match because there cannot be more than one trigger action.

Transitions an Activity Diagram

A transition is a link between two activities represented as a line going from one activity to another. It is a route the control flow transits on to link activities. The routing of the control flow is made using guard conditions defined on transitions. If the condition is true, the control is passed to the next element. The transition link is represented as a simple line with a direction (arrow).


A transition between an activity and an object state indicates that the execution of an activity puts an object in a specific state. When a specific event occurs or when specific conditions are satisfied, the control flow passes from the activity to the object state. Inversely, a transition between an object state and an activity means that the activity uses this specific state in its execution. The transition link is represented as a dashed line with a direction (arrow).


In addition to the above mentioned transitions, you can draw a transition from and to the following objects:

From\to Start Activity OS* Decision Fork Join End
Start        
Activity            
OS*        
Decision            
Fork          
Join            
End

= allowed

— = not allowed *OS = Object State

Note   Dragging a transition to a different object
You can change the object at either end of a transition by clicking the transition to select it, holding the ctrl key down, and dragging one of the attach points to a different object.

A transition can link shortcuts. A transition accepts shortcuts on both extremities to prevent the transition from being automatically moved when an activity is to be moved. In this case, the activity is moved and leaves a shortcut, but contrary to the other links, the transition is not moved. Shortcuts of transitions do not exist, and transitions remain in place in all cases.

Transitions in a Statechart Diagram

The statechart diagram transition is quite similar to that in the activity diagram, with the addition of a few properties:

The activity diagram is a simplification of the statechart diagram in which the states have only one action and the transition has a triggered event corresponding to the end of the action.

The transition link is represented as a simple line with a direction: an arrow. It contains information displayed above its symbol: the associated event, the condition and the action to execute.


You can draw a transition from and to the following objects:

From\to Start State Junction point End
Start    
State      
Junction point      
End

= allowed

— = not allowed

 


Copyright (C) 2006. Sybase Inc. All rights reserved.