How to use different ArrowColors?

0 votes
asked Sep 20 in Question / help by Alex

I would like to use two different ArrowColors in a State Diagram to point transitions that should be discussed with the team / client.

According to the skinparam documentation I should be able to archive this with the << ... >> annotation. 

However when I try this all transitions will become white on a white background. So this might be a bug or an error on my site since I have the feeling that I don't fully understand the documentation of the skinparam and especially the  << ... >> annotation.

Here is the code I used to try this:

@startuml

skinparam state {

ArrowColor Blue

ArrowColor Red <<InDoubt>>

}

state Class {

[*] --> Idle : create

Idle --> Idle <<InDoubt>> : update

Idle --> [*] : destroy

}

@enduml

1 Answer

0 votes
answered Sep 20 by plantuml (187,300 points)

Stereotypes only apply to states and not to arrows.

You can use colors for arrows this way:

@startuml
skinparam state {
    ArrowColor Blue
    }

    state Class {
    [*] --> Idle : create
    Idle -[#red]-> Idle : update
    Idle --> [*] : destroy
    }
@enduml

http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuIhEpimhI2nAp5K02fMaAbHpAG21Or5HVhbpVav-aO9JJcagMAoM2qH1bJdd91ONGnL7QyKgwEhQANYcvAGgM2aa5wK2LO1a82AwqSf5gIcn20Mb1Ice2e1IG3E0CYcfnIL5-PLGwnnIyrA0JWG0

...