Action before merge with break flow (forwards keyword missing?)

0 votes
asked Oct 1, 2022 in Question / help by jurf (160 points)
edited Oct 27, 2023 by jurf

I am trying to recreate this section of an acitivity diagram in PlantUML.

image

The best I managed is this:

repeat
    :Choose restaurant;
    if (is busy) is ([no]) then
        break
    else ([yes])
    endif
repeat while (wait) is ([no]) not ([yes])

image

But I cannot insert the wait action at the appropriate place. It is as if a forward keyword was missing.

1 Answer

0 votes
answered Oct 27, 2023 by jurf (160 points)
edited Oct 30, 2023 by jurf

This hack is the best I managed so far:

@startuml

start

while ()
    :Choose restaurant;

    if () is ([isn't busy]) then
        label l1
        goto nonexistant
    else ([is busy])
        if () is ([choose another]) then

        else ([wait])
            :⏳ 10 minutes;
            label l2
            goto nonexistant
        endif
    endif

endwhile
-[hidden]->
detach

goto l1
goto l2

stop

@enduml

rendered diagram

...