Fork/split in loop?

+1 vote
asked Sep 25, 2020 in Question / help by Christian D

Hi, our software is creating threads in a loop. I'd like to display this in an Activity Diagram. But obviously this seems not to be supported? I tried both repeat and while loops combined with both split and fork - no success. Maybe someone can help me out?

@startuml
start
repeat
:let's create a new thread inside the loop;
split
:new thread doing stuff;
end
split again
:original thread continuing loop;
repeat while (more?)
:original thread continues;
end
@enduml

http://www.plantuml.com/plantuml/uml/TOzD3eD024RtSmfsRQ-WYteLug2I89W1u_LBEctIJJU4BtcFdya3Mvoxb7TJ6Xs4KGQXk3dCBGC1Wj85iMMgmEfSAHE1c1rZyKCuZH-a6kiA7kUoZ8MqTWHmHTOoMEEL5ULBpwR1UgRI1tvkW6jZ8RZlrkZv-AkHznLJbdpZ1G00

1 Answer

0 votes
answered Oct 4, 2020 by wro02922 (780 points)
 
Best answer

I'm not sure if that's the point but maybe end spilt is missing?

@startuml
start
repeat
:let's create a new thread inside the loop;
split
:new thread doing stuff;
end
split again
:original thread continuing loop;
end split
repeat while (more?)
:original thread continues;
end
@enduml

PlantUML diagram

...