Drawing Timing Diagram
Timing diagram is a new artifact added to UML 2.0 and used to show interactions between objects. The purpose of this diagram is to explore the behaviors of one or more objects throughout a given period of time. VPUML gives many features to help you create a complete timing diagram and to customize it easily. This article will introduce you some major components of the timing diagram and to show you step by step how to create a complete timing diagram.
Creating a New Timing Diagram
You can create a timing diagram by any of these 3 methods listed below.
Method 1- Creating a timing diagram from the menu bar:
On the menu, select File > New Diagram > UML Diagrams > Timing Diagram. A new timing diagram will be created.

Method 2 - Creating a timing diagram from the toolbar:
Click on the New Timing Diagram button
from the toolbar. A new timing diagram will be created.

Method 3 - Creating a timing diagram from the Diagram Navigator:
Right-click on the Timing Diagram from the Diagram Navigator on the left side.
Click on
Create Timing Diagram from the pop-up menu. A new timing diagram will be created.
Creating a Timing Frame
After creating the timing diagram, you can add a timing frame to the diagram by choosing Timing Frame icon on the diagram palette then click on the diagram. A timing frame is used to group some interacted lifelines together in a single event.

Editing Timing Frame
To customize the newly created timing frame, right-click on the timing frame and select Edit Frame... from the pop-up menu. An Edit Frame dialog box is displayed. You can enter a new name and operator type for the timing frame in the Name and Operator Type field respectively (For example, Project Management for the Name and sd for the Operator Type). Click on the OK button to close the dialog box.

Creating Lifelines
A lifeline is the path an object takes across a measure of time in the timing diagram. You can add one or more lifelines in a single timing frame.
To add lifelines into your timing frame, right-click on the
Project Management timing frame and select
Add Lifeline from the pop-up menu. A new lifeline in the
Project Management timing frame is created.
Add another lifeline to the
Project Management timing frame.
You can easily rename the lifelines by double-clicking on the newly created lifelines (For example
Project Manager and
System Analyst lifelines).
Creating States/Conditions for Lifelines
State/Conditions are attached to the correspondent lifelines. The primary purpose of the timing diagram is to show the changes for the state or condition of a lifeline over a period of time. To create the state/condition for the newly created lifelines, right-click on the selected lifelines and select Add State/Condition from the pop-up menu. A new state/condition is created. You can rename the states/conditions by double-clicking on them (For example Create Project Schedule and Gathering Requirement state/condition).

Adding Time Units
To add the time units for your timing diagram, right-click on the Project Management timing frame and select Add Time Unit from the pop-up menu. Repeat the step to add as many time units as needed. Time units are used to indicate the period of time in a timing diagram.

Editing State Timeline
After adding enough time units, you can adjust the state timeline easily by dragging the state timelines to match the appropriate state/condition of the lifelines.

Editing Tick Mark of the Timing Ruler
A tick mark is a mark used to indicate a time unit over a period of time of the timing ruler.
You can move the tick mark unit left or right to adjust the space between tick marks.
To give values to the tick marks, double-click on the tick marks and enter the tick mark values.
Defining Stimulus
Stimulus is stimulating information to show the event causing the changes in state/conditions of the corresponding lifelines.
Right-click on the selected lifeline and select
Edit Lifeline... from the pop-up menu. An
Edit Lifeline dialog box is displayed.
Go to the Stimulus tab, double-click on the
Expression field and enter the stimulus expression. Click on the
OK button to close the dialog box.
Defining Time Constraints for Lifelines
Time constraint is used to show the time limitation of a particular lifeline for a specific time unit.
To set the time constraints value of a lifeline, right-click on the selected lifeline and select
Edit Lifeline... from the pop-up menu. An
Edit Lifeline dialog box is displayed.
Go to the
Time Constraints tab, double-click on the
Expression field and enter the time constraint expression. Click on the
OK button to close the dialog box.
Defining Duration Constraints for Lifelines
Duration constraint is used to show the duration limitation of a particular lifeline over a period of time.
To set the duration constraints value of a lifeline, right-click on the selected lifeline and select
Edit Lifeline... from the pop-up menu. An
Edit Lifeline dialog box is displayed.
Go to the
Duration Constraints tab, click on the
Add... button. An
Add Duration Constraint dialog box is displayed.
You can select the appropriate
Start time and
End time from the drop down menu. Fills in the duration constraint of the selected time on the
Constraint field. Click on the
OK button to close the dialog box.
Click on the
OK button to close the
Edit Lifeline dialog box.
Adding Time Message
Time messages are indicated as arrows between two timelines. Time messages are used to show messages between the lifelines over a period of time.
To add a time message for your timing diagram, right-click on the
Project Management timing frame and select
Edit Frame... from the pop-up menu. An
Edit Frame dialog box is displayed.
Go to the
Time Messages tab and click on the
Add... button. An
Add Time Message dialog box is displayed.
Fills in the time message name in the
Name field and you can simply select the appropriate values for
Start lifeline,
Start time,
End lifeline and
End time from the drop-down menu. Click on the
OK button to close the dialog box.
Click on the
OK button to close the
Edit Frame dialog box.
Compact lifeline with States (Compact View Mode)
Timing diagram in the compact view mode shows the lifecycle of lifelines over a period of time. In this mode, the timing diagram will only show you the states of the lifelines, the transition point between those states (as indicated by two lines crossing one another) and the time constraint of the diagram.
The compact view mode is good to be used when you need to explore a general behavior of one or more objects throughout a period of time while original view is used when you need to draw more detailed information about the transitions between the states of the lifelines.
To see the compact view mode of the timing frame, you can right-click on the timing frame and select View Mode > Compact from the pop-up menu.
Related Articles
Resources