Activity Diagram, adding SWITCH keywords

0 votes
asked Dec 5, 2020 in Wanted features by kasra (120 points)

Hello,

It would be nice if we could have the SWITCH keyword or something that simulates that.

Today the best option is  ( as far as I know )

@startuml
'!pragma useVerticalIf on
start
if (condition A) then (yes)
  :Text 1;
elseif (condition B) then (yes)
  :Text 2;
elseif (condition C) then (yes)
  :Text 3;
elseif (condition D) then (yes)
  :Text 4;
endif
@enduml

here is the diagram.

How could we get rid of the last branch and directly continue from the bottom line? 

if I exchange the last "elseif" to "else"  ( and I have to remove the "then (yes)") the condition is written on the line

and we lose consistency in my opinion.

the SWITCH is useful when we have an Enumeration and we know exactly the different possible values.

Hope that I am clear.

Best Regards,

Kasra

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...