I've noticed weird rendering errors when nesting repeat statements inside swimlanes:
When you put a nested repeat statement inside a single swimlane the diagram is broken:
Example with two swimlanes where the 2nd statement is in 2nd swimlane:
The only way to get the diagram to render correctly is to insert a dummy node as such:
All of this works perfectly when I don't use swimlanes at all like so: :)
Some context: I'm making an activity diagram using swimlanes to illustrate who performs an action. I'll probably switch to using colors so I can work around this :)
Not sure but in the non swimline version you jump back onto the "some action", shouldn't you jump to a "diamond" on top of it? According to the documentation (https://plantuml.com/activity-diagram-beta) it is OK to do it like you do it) This can be accomplished by means of writing the ": some action" on the next line like:
@startumlstartrepeatrepeat:some action;repeat while(test 1);repeat while(test 2);stop@enduml
That said, the version with the swimlane looks in that case OK as well:
@startuml|lane 1|startrepeatrepeat:some action;repeat while(test 1);repeat while(test 2);stop@enduml
But seen the previous mentioned documentation, I think there is a bug for this in the swimlane version and my solution is just a workaround.
Yup, I did that on purpose to demonstrate how the swimlanes cause that particular example to break.
My use case is that I want to highlight roles that are responsible for carrying out specific actions on the activity diagram.
Initially i wanted to use swimlanes to represent that, but inserting dummy nodes to fix rendering issues makes it a bit of a no no.
I tried to use colors for this but I can't find a way to color the 'repeat while' diamond differently from the 'repeat' diamond. I can either assign the same color to both:
Or only the first diamond if i combine both on the same line: `repeat :label`
Grouping does not work either since `partition` cannot break a repeat
I'm running out of ideas... :|