Merge arrows in Activity Diagram

0 votes
asked Jun 19 in Question / help by Ghash
edited Jun 20

Good day.

I have a diagram. Is there a way to merge arrows "No" from "if (Do we have a predict?)..." and "while (Can we check the predict experimentally?)"? Or at least make them both be drawn on the left side of diagram?

1 Answer

0 votes
answered Jul 1 by zimchaa (1,100 points)

It might be possible to use other methods to get the same information across in a slightly more understandable way:

Alt flow


@startuml
!pragma useVerticalIf on

start
:Form a hypothesis;

repeat

if (Can we create a falsifying prediction?) then (Yes)
-[#green]->

  if (Can we check the prediction experimentally?) then (Yes)
  -[#green]->

    :Conduct experiment;

    if (Is Hypothesis falsified?) then (Yes)
    -[#green]->

      :Hypothesis is wrong;

      stop
 
    else (No)
    -[#red,dashed]->

      :Hypothesis is possibly wrong;
 
    endif

  else (No)
  -[#red,dashed]-> No;
  
  endif

else (No)
-[#red,dashed]-> No;

endif

backward :Try to create falsifying prediction;

repeat while (Continue?) is (Yes) not (No)
-[#red,dashed]->

:Hypothesis is not falsifiable;

stop

@enduml

Using things like colour and styling to highlight the negative paths.

commented Jul 1 by zimchaa (1,100 points)
I thought vertical if might be able to help but doesn't seem to be useful in this situation where you're checking the same thing for multiple conditions rather than different things in sequence.
...