Activity Diagram Beta - NPE after using goto

0 votes
asked Jul 22, 2022 in Bug by krasa (820 points)

1 Answer

+1 vote
answered Jul 25, 2022 by The-Lu (64,760 points)
selected Jul 25, 2022 by krasa
 
Best answer

Hello K., and all,

This NPE is a bug...

But on the current implementation: you must to declare `label` before to use it with `goto`...
[And for alignment, you must to add dummy label (`label d`)]

Then here is an attempt:

@startuml
start
:export;
:nazev souboru = z db;
if (je revize nebo ma revize?) then (ano)
  if (**ne:** uz je jedna uploadnuta?) then (ne)
    label d
    label d
    label d
    label d
    label uploadRevize
    :nazev souboru= z posledni revize;
    :postupne uploaduj;
    stop
  else (ano)
    :najdi driveItem na sharepointu podle id;
    if (**ne:** existuje?) then (ne)
    label d
    goto uploadRevize

    else (ano)
      :pouzij jeho jmeno;
      :Upload s overridem;
      if (???JE NAZEV SOUBORU Z DB JINY??) then (ne)
        stop
      else (ano)
        :prejmenunuj na nazev z db;
        stop
      endif
    endif
  endif
endif
stop
@enduml

Enjoy...

If that can help,
Regards.

...