Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elseif and switch in activity diagram (beta) do not honour conditionStyle skinparam #1714

Open
jwrightecs opened this issue Mar 19, 2024 · 0 comments
Labels

Comments

@jwrightecs
Copy link

jwrightecs commented Mar 19, 2024

Is your feature request related to a problem? Please describe.
The skinparam conditionStyle allows the setting of conditional style (where to put the condition, whether to use a diamond) in activity diagrams. This works in if, while and repeat, but breaks for elseif and doesn't work for switch

Describe the solution you'd like
The decision point <> should respect the specified conditionStyle skinparam

Describe alternatives you've considered
both if...elseif..else..endif and switch...case...endswitch can be represented by a switch with an unlabeled condition, (with possible preceding labeled arrow) which appears ok; if...elseif...endif can be made out of if...else if ... endif...endif which is equivalent in meaning, but creates a lot of unnecessary nesting in the diagram

Additional context
switch example
what i try

@startuml
skinparam conditionStyle diamond
start
switch (test?)
case ( condition A )
  :Text 1;
case ( condition B ) 
  :Text 2;
case ( condition C )
  :Text 3;
case ( condition D )
  :Text 4;
case ( condition E )
  :Text 5;
endswitch
stop
@enduml

what I would expect

@startuml
start
-> test?;
switch ()
case ( condition A )
  :Text 1;
case ( condition B ) 
  :Text 2;
case ( condition C )
  :Text 3;
case ( condition D )
  :Text 4;
case ( condition E )
  :Text 5;
endswitch
stop
@enduml

if...elseif example
what i was expecting

@startuml
skinparam conditionStyle diamond
start
switch ()
case (condition A)
  :Text 1;
case (condition B)
  :Text 2;
  stop
case (condition C)
  :Text 3;
case (condition D)
  :Text 4;
case ()
  :Text else;
endswitch
stop
@enduml

what i get

@startuml
start
if (condition A) then (yes)
  :Text 1;
elseif (condition B) then (yes)
  :Text 2;
  stop
(no) elseif (condition C) then (yes)
  :Text 3;
(no) elseif (condition D) then (yes)
  :Text 4;
else (nothing)
  :Text else;
endif
stop
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant