How to Use Duration Constraint in Sequence Diagram?
In a UML 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, you can add duration constraint to messages in one click. This tutorial will demonstrate this how to define duration constraint in sequence diagram.
- Download Online Book Store.vpp. You can also find this file at the bottom of this tutorial.
- Open the downloaded .vpp file in Visual Paradigm. To open a project, select Project > Open from the application toolbar.
- Let's take the following UML sequence diagram as an example:

- Assume you need to specify the time limit between the Browse message and the Book List message. You therefore have to add a duration constraint between them. Move the mouse over the Browse message and click the Duration Constraint button.

- Drag it from the Browse message to the Book List message and then release the mouse.

- 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.

- The duration constraint between the Browse message and the Book List message is shown below:

- On the other hand, you can add a duration constraint not only between two messages, but also on the message itself. Let's try to add a duration constraint on the Query message. Move the mouse over the Query message and click the Duration Constraint button.

- Assume it should take less than 10 seconds. Enter < 10s inside the caption.

- The duration constraint for the Query message is shown below:
