How to do nested repeat loops in activity diagram

0 votes
asked Aug 3 in Question / help by rd27 (460 points)

How can I do nested repeat loops in activity diagram? The following doesn't seem to work...

@startuml
start
repeat
  : step 1;
  repeat
    : model 1
  repeat while () (100)
  : sleep 5s;
repeat while () is (infinite)
@enduml
http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuG8pk8fI2r8JIxWK5AmKYajI2nGChO5ik218E3S_9JL7mH0kh52UaPcJgg2XgQ1XQ62W2T6QamhKQrfipOMk9hDOGICpBoqpBxCaLPFB8JKl1MWt0000

1 Answer

0 votes
answered Aug 3 by Martin

I think you've just got two syntax problems.  You're missing a ";" after "model 1".  And you're missing an "is" in your first "repeat while".  So if I add those, I get:
http://www.plantuml.com/plantuml/png/SoWkIImgAStDuG8pk8fI2r8JIxWK5AmKYajI2nGChO5ik218E3S_9JK7MLoXF2Cp9rL1GrCXirX1mz30G1EYFISLgD-qs9eBcxBClBJClCoIL4qkXzIy5A3z0000

http://www.plantuml.com/plantuml/png/SoWkIImgAStDuG8pk8fI2r8JIxWK5AmKYajI2nGChO5ik218E3S_9JK7MLoXF2Cp9rL1GrCXirX1mz30G1EYFISLgD-qs9eBcxBClBJClCoIL4qkXzIy5A3z0000

Is that what you wanted?

...