Monday, March 19, 2001 08:49 AM
Well, probably not as well as you would want.
Iteration is a behavioural concept, therefore it only appears in behavioural diagrams and elements. In particular iteration is best diagramed in activity diagrams (flow chart like diagrams), and statecharts (state diagrams). Where it the control flow can be easily traced back.
Most people like to see where iteration appears in the context of a scenario (i.e. sequence and collaboration diagram). The UML does define a mechanism to indicate that a particular message is iterative. On the message you annotate an iteration-clause, which appears as a condition surrounded by square brackets all prefaced by an asterisk. For example:
| *[i:=1..n] add item |
indicates that the add item message is part of an iteration that is bounded by the value of i being between 1 and n. The actual content of the interation-clause is not defined by UML, so you can put anything you want in the square brackets.
Personally I just annotate the sequence diagram with lots of text.