activity: cannot write a test following a barrier, except on same line

0 votes
asked Apr 26, 2016 in Bug by yann (200 points)
In the following graph, I cannot move the "if C" to the next line, whereas the doc's "complete example"  has something

similar with 'if "Do redirect?"' that follows a barrier (although the latter is itself inside an if), even without any explicit edge.

Note that the rule for such implicit arrows would be good to describe explicitely.

Also note the orientation of the arrow O --> ==P2==.  Even specifying it as -d-> does not work (somewhat of a separate bug ;)

@startuml

partition P1 {
  (*) --> X
  --> == B1 ==
  --> Y
  ---> == B2 ==
  --> Z
}

partition P2 {
  == B1 ==   -->  if C then
    --> [yes] M
    --> N
  else
    --> N
  endif

  --> O
  --> == B2 ==
}

@enduml
commented Apr 26, 2016 by yann (200 points)
Also, what if I would like eg. the "if C" and "M" to be in partition P1 but "N" in P2 ?  Or even just have the "if C" outside of any partition, and "M" and "N" still in P2 ?  (I'm still hesitating as to how to express my graph, and I'm feeling a bit limited in options)

2 Answers

0 votes
answered Apr 27, 2016 by Serge Wenger Work (15,620 points)

Hello,

For the  the orientation of the arrow O --> ==P2==, there is a workaound: I make "longer connections" with:

   ----> Y

   ----> == B2 ==

  ---> Z
 
I try to do the same with the new beta syntax and I have a problem.. P2 is inside P1!!!
 
@startuml
 
partition P1 {
start
:X;
fork
:Y;
fork again
partition P2 {
 if (C) then (yes)
   :M;
 else
 endif
 :N;
 
 :O;
}
endfork
:Z;
}
 
@enduml
 
 
Hope this helps

 

0 votes
answered May 1, 2016 by plantuml (295,000 points)

Another possible option is to use swimlanes:

@startuml
|P1|
start
:X;
fork
:Y;
fork again
|P2|
if ()
:M;
endif
:N;
:O;
|P1|
end fork
:Z;
@enduml

Check here

...