How to referencing a previously created activity

0 votes
asked Jan 27, 2020 in Question / help by jamesla (120 points)

How do I return to a step near the beginning of my activity flow. 

In my contrived example I want to go from "should we return to the beginning?" and it should go to the already existing "Starts here" rather than creating a new one.

I have read through the docs 3-4x I just can't find it anywhere.

image

@startuml

:starts here;

repeat :check something;
  repeat while (did it work) is (no)
  ->yes;

if (should we return to the beginning) then (yes)
  :starts here;
else (no)
endif
  
@enduml

1 Answer

0 votes
answered Jan 27, 2020 by Serge Wenger Work (15,620 points)

Hello, you must create another loop:

@startuml
repeat :starts here;

repeat :check something;
repeat while (did it work) is (no)
  ->yes;

repeat while  (should we return to the beginning) is (yes)
  ->No;
  :next;
@enduml

http://www.plantuml.com/plantuml/png/HSv13e8m40NGVK_nbx3m0ZGndC0x8FsX3J0rdI7exMrirENycNdvezfKxDWtL_ZWP1W-WIAoqBjVEaVEApJlj9XayT_56TD6T245f3hbilP8Yavoxu3BzKLjolyOdSPyR04dKMX74LY6HUBE9ObKlXdrjo6tx1qm29_ctKW9jUyR 

...