@startuml

:ZB_BDB_SIGNAL_DEVICE_REBOOT;

if (status == RET_OK) then (no)
    if (role == coordinator) then (no)
        :start_network_rejoin();
    else (yes)
    endif
else (yes)
    :stop_network_rejoin(ZB_FALSE);
endif

stop

@enduml