Elseif SkinParam doesn't seem to use the ActivityDiamond

0 votes
asked Jul 31, 2018 in Question / help by Jeff Martin

I'm trying to use skin params and while the If, else skin just fine, the diamond created by the elseif does not... 

@startuml
skinparam activity {
   BackgroundColor #00538D
   BorderColor #00538D
   BorderThickness 1
   BorderRoundCorner 1
   ArrowColor #8CC63E
   FontName Helvetica
   FontColor White
   DiamondBackgroundColor #00538D
   DiamondBorderColor #00538D
   DiamondFontName Helvetica
   DiamondFontColor White
}
title If else elseif example
if (If Text) then (yes)
:Do Something;
else (No)
endif
if (Option A) then 
:A Thing>
elseif (Option B)
:B Thing>
elseif (Option C)
:C thing>
endif
@enduml
commented Aug 1, 2018 by albert (3,520 points)
Looks like that some entities are used for the "if / else if" construct (I like not to reuse colors for test cases like these so it will be even more clear what is the problem and what influences what):
   DiamondBackgroundColor #ffffff
   DiamondBorderColor #ff0000
   DiamondFontName Helvetica
   DiamondFontColor #00ff00
just not the DiamondFontColor. It looks like the DiamondFontColor  is only used in a simple "if / else" construct.

1 Answer

0 votes
answered Aug 2, 2018 by plantuml (295,000 points)
Thanks for the report : it's actually a bug

It should be fixed in last beta http://beta.plantuml.net/plantuml.jar

Tell us if it's not working for you
commented Aug 8, 2018 by jmartin (120 points)
Generally using Planttext.com and the plugin in confluence so no good way of testing - but thanks for the response - always good to know i'm not doing something wrong/stupid.
commented Jan 20, 2019 by albert (3,520 points)
Looks like it is not yet / anymore working or it is not clear how it should work: https://stackoverflow.com/questions/54267722/how-to-replicate-flowchart-using-plantuml-or-graphviz
commented Jan 21, 2019 by albert (3,520 points)
The example from the stackoverflow site

@startuml
skinparam linetype polyline
skinparam linetype ortho
skinparam backgroundColor #ff000000

skinparam ActivityDiamondBackgroundColor red
skinparam ActivityDiamondBorderColor blue

skinparam activity {
BackgroundColor<<iftrue>> #f4d03f
BorderColor<<iftrue>> #FF6655
BackgroundColor<<cond>> #58d68d
BorderColor<<cond>> #58d68d
BackgroundColor<<step1>> #58d68d
BorderColor<<step1>> #58d68d
ArrowColor #Black
DiamondBackgroundColor red
DiamondBorderColor blue
FontName Impact
}

(*) -down[#black]-> "Evaluate loss index"  as step1 <<step1>>
step1 -down-> if "" as conif then
-left[#black]-> [Stopping criteria = true] "Improve neural network parameters
    ====
    * Calculate quasi-Newton training direction
    * Calculate training rate" as iftrue <<iftrue>>
iftrue -up[#black]-> step1
else
    -down[#black]-> [Stopping criteria = false] (*)
endif
@enduml



http://www.plantuml.com/plantuml/png/VL4zRzim4DtvAmxAqWOGaAAraI4nyj4Qw9AbO-215ay9OOgd7ezsZQB_lIVPQ0YbDXUIUXzwV7UNnBBaBfYqyR6tR3i8FgBiUuIUmdwu_0yZbbSgWBLjDYzCERf72iHmqRPNup85wRuHl_Mo_-fjHz4zJ3ICxWoPs24VYEkGiVIrHohyDXFFcnlV2cTSB3JH5tVrkJM5KOakb_FvRFPUtr1q0pwxTlDhLwhVOrDj4km_dH9FmNjcsXtBUmXgPSxKTAgK9KLviXt2zwxNLimVOpvSVeJQqIu-Nwm7srMzWEhRrePi1I5GIk2ZmryLW4qmfe9_wSou7_IgyorKrK3Jb-jPNZ62gGEsKfW__n3gUnzVe64loDx2BGmrhw3IM4nRX8YPRT1DTiGR6CU8oaq6TDtg6W-Ny6X3ayEGz6UsoTTFk1EAQcTz77xXFADEd-AK_qPXlOsX3yE6jwcRuvSwzqN-ySa6GyBHi-pkvFDQg_GLQDS6e_EjkTCjT-4l
commented Jan 22, 2019 by albert (3,520 points)
I tested the stackoverflow version with the newest beta (PlantUML version 1.2019.01beta4) and it gave the, for me, expected results (version PlantUML version 1.2019.01beta3 didn't).
The workaround as shown in the comment from @plantuml works in bot cases.
...