Can you combine stereotypes with backward keyword in activity diagrams

0 votes
asked Aug 3, 2021 in Question / help by BungledB (180 points)

Heya,

I'm working with activity diagrams, and I want to colourise specific activities. I can do this with a stereotype applied to most things, like this:

@startuml
skinparam activity {
    BackgroundColor Olive
    BackgroundColor<<AltCol>> Green
}

<<AltCol>>repeat :Job Summary Page]
    :Tap "Log" from Job summary;
    :Tap layer 1 class;
    :Tap layer 2 class;
    :Take Photo;
    <<AltCol>>:Fill required details;
    :Submit;
    backward :Show Confirmation]

@enduml

But I can't figure out how to get it to work with "backward" items. This doesn't work, for example:

<<AltCol>>backward :Show Confirmation]

I tried various combinations but it errors every time.

Is this possible, or is it not implemented in the new syntax?

1 Answer

0 votes
answered Sep 13, 2023 by The-Lu (64,960 points)

Hi B., and all,

FYI, the color/style issue is now fixed (by using style and stereotype) on the last snapshot, see here:

@startuml
skinparam activity {
    BackgroundColor Olive
    BackgroundColor<<AltCol>> Green
}

<style>
.task {
  BackgroundColor Green
}
</style>

<<AltCol>>repeat :Job Summary Page]
    :Tap "Log" from Job summary;
    :Tap layer 1 class;
    :Tap layer 2 class;
    :Take Photo;
    <<AltCol>>:Fill required details;
    :Submit;
    backward :Show Confirmation; <<task>>

@enduml

Remains now (to be consistent) this wanted feature:

Thanks PlantUML team, yes
Regards,
Th.

...