How do I add link notes in sub states

0 votes
asked Nov 5, 2015 in To be sorted by bep (120 points)
Hi, how do I add notes for links in substates? I've tried the following but the translation fails. The note at the end works just fine if I remove the note from the inner state.
 
@startuml
 
[*] --> SubState
 
state SubState {
    [*] --> State1
    State1 --> State2
    note right on link
    hi
    end note
    State2 --> State3
}
 
OtherState --> OtherState2
note right on link
hi
end note
 
@enduml

1 Answer

0 votes
answered Nov 8, 2015 by plantuml (295,000 points)

Hi,

Thanks for the feedback. Your diagram is correct, but there is a bug in the parser.

This has been just fixed in last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

The fix will be included in next official release.

As temporary workaround you can remove heading spaces at "note right on link" and "end note" lines :

 [*] --> SubState
 
state SubState {
    [*] --> State1
    State1 --> State2
note right on link
  hi
end note
    State2 --> State3
}
 
OtherState --> OtherState2
note right on link
hi
end note

Thanks again!

...