Using Duration Constraint in Sequence Diagram

In a sequence diagram, a duration message is used to indicate the passage of time of message. It's especially useful when you want to model a real-time system. With Visual Paradigm for UML (VP-UML) 8.0, you can add duration constraint to messages in one click. This tutorial will demonstrate this how to define duration constraint in sequence diagram.

August 16, 2010
User Rating: / 1
Views: 4,439
PDF Link Add comments
Edition: Community or above (Edition comparison)

  1. Download Online Book Store.vpp from this tutorial in advance.
  2. Open the project with VP-UML.
  3. Let's take the following sequence diagram as an example:
    sample sequence diagram
  4. Assume you need to specify the time limit between Browse message and Book List message, you therefore, have to add duration constraint between them. Move the mouse over Browse message and press Duration Constraint button.
    click duration constraint
  5. Drag it from Browse message to Book List message and then release the mouse.
    drag line
  6. Enter the constraint detail inside the caption. For example, it should take more than 3 seconds but less than 5 minutes. You can enter > 3s & < 5mins.
    enter duration
  7. The duration constraint between Browse message and Book List message is shown below:
    created result
  8. On the other hand, you can add duration constraint not only between two message, but also on the message itself. Let's try to add duration constraint on Query message. Move the mouse over Query message and click Duration Constraint button.
    add duration constraint
  9. Assume it should take less than 10 seconds. Enter < 10s inside the caption.
    enter duration
  10. The duration constraint for Query message is shown below:
    duration result

Resources

  1. Online Book Store.vpp

Rate this Article

Click on one of the stars below to rate this article from 1 (lowest) to 5 (highest).

You may be interested in

  1. Writing Effective Use Case
  2. UML Package Diagram
    Tagged:
  3. Draw Entity Relationship Diagram (ERD)
    Tagged:
  4. Produce UML Use Cases from Business Process Diagram (BPD)
  5. Draw UML Sequence Diagram with Keyboard
Tags of this article:

Comments (2)

written by John Finbraaten on October 1, 2010

You have minutes abbreviated as "ms", but this is usually the abbreviation for milli-seconds. Probably better to abbreviate minutes as "min".

written by Jick Yeung on October 7, 2010

Hi John,

Thank you for sharing your finding with us. The page has been updated. If you have any other comments, feel free to post again.

Best regards,
Jick

Write comment

Rating

Comment

Enter the calculation result

security code