UML Diagrams
Timing Diagram
O/R Mapping
Mac OS X
Tips and Tricks
VP Suite
Change Log

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.
drawing_timing_diagram-1.jpg

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

Method 3 - Creating a timing diagram from the Diagram Navigator:

  1. Right-click on the Timing Diagram from the Diagram Navigator on the left side.
  2. Click on Create Timing Diagram from the pop-up menu. A new timing diagram will be created.
    drawing_timing_diagram-4.jpg

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.
drawing_timing_diagram-5.jpg

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.
drawing_timing_diagram-6.jpg

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.

  1. 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.
    drawing_timing_diagram-7.jpg

  2. Add another lifeline to the Project Management timing frame.
    drawing_timing_diagram-8.jpg

  3. You can easily rename the lifelines by double-clicking on the newly created lifelines (For example Project Manager and System Analyst lifelines).
    drawing_timing_diagram-9.jpg

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).
drawing_timing_diagram-10.jpg

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.
drawing_timing_diagram-11.jpg

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.
drawing_timing_diagram-12.jpg

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.

  1. You can move the tick mark unit left or right to adjust the space between tick marks.
    drawing_timing_diagram-13.jpg

  2. To give values to the tick marks, double-click on the tick marks and enter the tick mark values.
    drawing_timing_diagram-14.jpg

  3. Defining Stimulus

Stimulus is stimulating information to show the event causing the changes in state/conditions of the corresponding lifelines.

  1. Right-click on the selected lifeline and select Edit Lifeline... from the pop-up menu. An Edit Lifeline dialog box is displayed.
    drawing_timing_diagram-15.jpg

  2. 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.
    drawing_timing_diagram-16.jpg

Defining Time Constraints for Lifelines

Time constraint is used to show the time limitation of a particular lifeline for a specific time unit.

  1. 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.
    drawing_timing_diagram-17.jpg

  2. 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.
    drawing_timing_diagram-18.jpg

Defining Duration Constraints for Lifelines

Duration constraint is used to show the duration limitation of a particular lifeline over a period of time.

  1. 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.
    drawing_timing_diagram-19.jpg

  2. Go to the Duration Constraints tab, click on the Add... button. An Add Duration Constraint dialog box is displayed.
    drawing_timing_diagram-20.jpg

  3. 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.
    drawing_timing_diagram-21.jpg

  4. Click on the OK button to close the Edit Lifeline dialog box.
    drawing_timing_diagram-22.jpg

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.

  1. 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.
    drawing_timing_diagram-23.jpg

  2. Go to the Time Messages tab and click on the Add... button. An Add Time Message dialog box is displayed.
    drawing_timing_diagram-24.jpg

  3. 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.
    drawing_timing_diagram-25.jpg

  4. Click on the OK button to close the Edit Frame dialog box.
    drawing_timing_diagram-26.jpg

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.
drawing_timing_diagram-27.jpg

Related Articles

Resources

 
 
Last modified: 2006/01/07 02:40
 
 
Home | Recent Topics | Highlights | UML Diagrams | Tips and Tricks | Object-Relational Mapping
visual-paradigm.com Home | Training Center | UML Center | VP Gallery | Discussion Forum | UML Open Directory