Representing a “wait until” in an activity diagram in UML

activityuml

How can I represent a "wait until customer representative is available" in the UML activity diagram below? A solution in UML 1 or UML 2 are both acceptable.

Proposal 1

wait state model

The simple line back to the second condition "looks" wrong.

Proposal 2

I also came up with this "cleaner" solution.

enter image description here

(I know that the final point is missing.)

Best Answer

IMHO, there is actually no need to include any conditional or "loop" for the "wait" state at all:

Activitive_Example

Any activity needs a certain time until it is completed. If a customer representative is available immediately, the time for the wait activity is zero, if not, the activity will just take some minutes or maybe hours. But the power of "zero" is it can be often handled just like any other number, without the need for artificial distinctions.

Of course, if you want to model the "Wait" activity explicitly, because in your system something essentially different will happen during a "real wait", go with your solution 2.

Related Topic