How should i code a "forever loop" Activity Diagram (beta)?

0 votes
asked Oct 19, 2017 in Wanted features by Mauro

I want to describe a task that, after initialization, loops forever.

I tried something like:

start
:initialize;
while (Timer interrupt)
    :do something;
endwhile

This somewhat works, but also draws an ugly (and useless) arrow representing the (nonexistent) exit from loop.

    start
    :initialize;
    repeat
        :wait Timer interrupt
        :do something;
    repeat while

This doesn't have the arrow problem, but it's less graphically nice as it requires a useless junction.

Is there a way around?

1 Answer

0 votes
answered Oct 23, 2017 by ahnajmi (140 points)

You cannot avoid the junctions at present but draw to express the stuff if you want while condition on top, repeat would look like a do while

start
    :initialize;
    repeat
    while(wait for interrupt) is (interrupt)
    :do something;
    endwhile (no interrupt)
    repeat while

...