Nested IFs with a single diamond

0 votes
asked Mar 12, 2021 in Question / help by MarkWeyland (460 points)

I have a UML like this:

@startuml
if (ConditionA) then (Yes)
    :ActionA;
    if (ConditionB) then (Yes)
        :ActionB;
        if (ConditionC) then (Yes)
            :ActionC;
        else (No)
        endif
    else (No)
    endif
else (No)
endif
@enduml

And it produces an output like this:

output

Instead of what I am getting, would it be possible to make all the IF statements converge into a single diamond?

This is similar to these questions:

https://forum.plantuml.net/10359/nested-statements-that-end-same-place-have-extra-connectors

https://forum.plantuml.net/4015/its-possible-to-draw-if-else-endif-without-merge-symbol

However I could not an answer in those.

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.
...