Skinparam not working on Activity (old syntax / new syntax) embedded into partition

0 votes
asked Aug 6 in Question / help by Mike (140 points)
edited Aug 6 by Mike

Hi,

I try to customize partition and its embedded activity but I don't succeeded ...

I start with the working script :

@startuml

skinparam  partition {
   BackgroundColor<<bluepartition>> blue
}

skinparam  activity {
   BackgroundColor<<redactivity>> red
}


partition "My Partition" <<bluepartition>> {

}
@enduml

If I test the customize of an embedded activity only, it is also working :

@startuml

skinparam  partition {
   BackgroundColor<<bluepartition>> blue
}

skinparam  activity {
   BackgroundColor<<redactivity>> red
}


partition "My Partition"  {
(*) --> Activity 1
--> Activity 2 <<redactivity>>
--> (*)
}
@enduml

But when I customize everything, it is failing :

@startuml

skinparam  partition {
   BackgroundColor<<bluepartition>> blue
}

skinparam  activity {
   BackgroundColor<<redactivity>> red
}


partition "My Partition" <<bluepartition>> {
(*) --> Activity 1
--> Activity 2 <<redactivity>>
--> (*)
}
@enduml

If I try to only customize the partition it also failed :

@startuml

skinparam  partition {
   BackgroundColor<<bluepartition>> blue
}

skinparam  activity {
   BackgroundColor<<redactivity>> red
}


partition "My Partition" <<bluepartition>> {
(*) --> Activity 1
--> Activity 2
--> (*)
}
@enduml

I also try the new activity syntax : ok for the partition customization only :

@startuml

skinparam  partition {
   BackgroundColor<<bluepartition>> blue
}

skinparam  activity {
   BackgroundColor<<redactivity>> red
}


partition "My Partition" <<bluepartition>> {
start
:Activity 1;
:Activity 2;
stop
}
@enduml

But I can't success to customize the new activity syntax with <<redactivity>>

Can someone can help me or explain me the limitation ?

Thank you in advance.

Mike

1 Answer

0 votes
answered Aug 6 by plantuml (208,820 points)
selected Aug 6 by Mike
 
Best answer

This is due to some incomplete implementation.

We have fixed this is last beta http://beta.plantuml.net/plantuml.jar so that now you can have:

@startuml
skinparam  partition {
  BackgroundColor<<bluepartition>> blue
}

skinparam  activity {
  BackgroundColor<<redactivity>> red
}

partition "My Partition" <<bluepartition>> {
start
#green:Activity 1;
<<redactivity>>:Activity 2;
stop
}
@enduml

and

@startuml
skinparam  partition {
   BackgroundColor<<bluepartition>> blue
}
skinparam  activity {
   BackgroundColor<<redactivity>> red
}

partition "My Partition" <<bluepartition>> {
(*) --> Activity 1 <<redactivity>>
--> Activity 2
--> (*)
}
@enduml

Is this what you were looking for ?

commented Aug 6 by Mike (140 points)
I am just trying this BETA version updating manually the Visual Studio Code plugin, dans the result is exactly what I am looking for !!!

I will wait now for an official release !

Thanks for your feedback
commented Aug 16 by wickedpygmy
Thanks for this great fix!

Just to let you know that it seems to not work well in combination with the multiline text feature. But it works okay if lines are split using \n instead.
commented Aug 16 by plantuml (208,820 points)
Could you post a short example with the multiline text not working ?

It would help us to fix it!

Thanks!
...