Activity diagram: Allow empty label after 'then' keyword (on conditional if then else)

0 votes
asked May 19, 2020 in Wanted features by The-Lu (64,340 points)

Hello PlantUML team,

  • Could you add the possibility to have got empty label for 'then' keyword?

Like:

if (bla bla bla(()))))<color:red>KO?) then ()

[Adapted from https://plantuml.com/activity-diagram-beta#9d3afea73e90192d]

1/ With not empty label : OK

if (bla bla bla(()))))<color:green>KO?) then (a)

PlantUML diagram
[Click to see code]

2/ With empty label : KO

if (bla bla bla(()))))<color:red>KO?) then ()

PlantUML diagram
[Click to see code]


Regards,
Th.

1 Answer

0 votes
answered May 19, 2020 by Serge Wenger Work (15,620 points)

Add a space instead of a:

@startuml
skinparam Backgroundcolor transparent
start
if (bla bla bla(()))))<color:green>KO?) then ( )
  :a;
else (b)
  :b;
endif
stop
@enduml

commented May 19, 2020 by The-Lu (64,340 points)

Hello Serge,

Thanks,

And, if the label is empty, I can also suppress the '()' and even all the expression 'then ()', and with that: that is OK.

Like:

@startuml
skinparam Backgroundcolor transparent
start
if (bla bla bla(()))))<color:green>OK?) then
  :a;
else (b)
  :b;
endif
stop
@enduml

or

@startuml
skinparam Backgroundcolor transparent
start
if (bla bla bla(()))))<color:green>OK?)
  :a;
else (b)
  :b;
endif
stop
@enduml

Regards,
Th.

...