Activity -Diagram with Swimlanes and splits/if - generates diagram with a lot of whitespace

0 votes
asked Mar 15, 2020 in Question / help by W0nlK (120 points)

Hello,

when creating an activity diagram spanning over multiple swimlanes and when using "if" or "split", then PlantUML generates a lot of whitespace (by not putting items below each other but it seems it's placing items into distinct "columns" - see "Actor A" and "Actor B" in the example below).

Is there a way to prevent this?

Thank you, Andreas

@startuml
|#AntiqueWhite|Actor A|
|Actor B|
|#AntiqueWhite|Actor C|

|Actor A|
(B)
:Some random action;

split
        |Actor A|
        if (Some condition shown here) then (no)
                :Some random action;
                
                :Some random action;
                end;
        else
                :Some random action;
                detach;
        endif;
split again
        |Actor B|
        :Some random action;

        |Actor C|
        :Some random action;
        
        :Some random action;

        :Some random action;

        |Actor B|
        :Some random action;

        |Actor A|
        :Some random action;

        |Actor B|
        :Some random action;

        |Actor C|
        if (Test condition) then (yes)
                if (Some other condition) then (true)
                        |Actor B|
                        :Some random action;
                        |Actor A|
                        :Some random action;
                else (false)
                        |Actor C|
                        :Some random action;
                endif
                
        else (otherwise)
                :Some random action;
                end;
        endif

end split

:TODO TODO TODO;

@enduml

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...