2

How to add nested alt flow in plant UML ?

I have a use case in which I want nested alt. Similar to below

When I add it only innermost alt is displayed. Need help in finding right syntax for it

alt [condition 1]

  do some steps

   alt [condition 2]

    
    do some steps
    
  else [condition 2 Not true] so do nothing
  

else  [condition 2 Not true] so do nothing
albert
  • 8,285
  • 3
  • 19
  • 32
Divya Gandhi
  • 31
  • 1
  • 2

1 Answers1

10

You have to add an end statement to close the alt block.

As a side note: You do not need to add the square brackets in your alt statements. PlantUML renders those itself.

alt condition 1
bob -> alice
   alt condition 2
   bob -> alice
   else condition 3
   bob -> alice
   end
else  condition 4
bob -> alice
end
khalito
  • 971
  • 5
  • 22