How to use stereotyped notes on state diagram

0 votes
asked May 14, 2019 in Question / help by murakami (160 points)
edited May 20, 2019 by murakami

For state diagram I would like to use stereotyped notes , e.g. like so:

@startuml
skinparam noteBackgroundColor #lightblue
skinparam noteBackgroundColor<<stereotyped>> #lightpink

note <<stereotyped>>  right of state1 : "test_text2"
note  left of state2 :  "test_text1"

state state1 : has stereotyped notes
state state2 : has notes
@enduml

But this does not work and I get syntax errors.
Is there any way to make it also work ?

commented May 14, 2019 by albert (2,940 points)
edited May 20, 2019 by albert

I gave your code a go in the online web server and got: http://www.plantuml.com/plantuml/uml/VSn12i8m48NXVKxnY2UeIobTw44ascaDYPamUGMzlHG5qKNt__Ut54iD5kueIZc6QvfDbpAUDAjXb-DyuoKluZR3lcyK4-MpoZWC7rTZIMwjWImJeHCQ0wN30V2KnZFbmSw_e_y9R9tyg2_QU_S2

So which version of plantuml are you using?
What are the error messages you get ?

EDIT:

Later on OP has clarified, problem due to missing lines:

state state1 : has stereotyped notes
state state2 : has notes 

in original example (have been added to question).

2 Answers

0 votes
answered Jul 29 by AnneVl (160 points)

Is there any update on this?

I have the same issue in state diagrams.

I also tried the new (beta) style syntax but get the same error:

@startuml
skinparam useBetaStyle true
<style>
  note {
    BackgroundColor #ccffff
  }

  .Blue{
    BackgroundColor LightBlue
  }

</style>
state Test1
note right of Test1 : This is a note
note <<Blue>> left of Test1 : This is a note

@enduml

Error found in diagram states-1
ERROR
14
Syntax Error?
Some diagram description contains errors

 

0 votes
answered Jul 29 by The-Lu (10,120 points)

Hello M. and A.,

The current syntax, for state diagram, seems to be:

note  right of state1 <<stereotyped>>: "test_text2"


[click...]

And:

note left of Test1 <<Blue>>: This is a note


[click...]

Regards,
If that can help,
Th.

commented Jul 29 by The-Lu (10,120 points)

Hello All,

Then that is :

  • OK by skinparam
  • but KO by stereotype style.

Perhaps stereotype style is not yet implemented on State diagram?

For similar defect, see also:

Regards,
Th.

commented Jul 29 by AnneVl (160 points)

Yes that seems to work, but not on lines/arrows

````
@startuml
skinparam noteBackgroundColor #lightblue
skinparam noteBackgroundColor<<stereotyped>> #lightpink

note  right of state1 <<stereotyped>>: "test_text2"
note  left of state2 :  "test_text1"

state state1 : has stereotyped notes
state state2 : has notes
state1 -> state2
'does not work
note on link <<stereotyped>>: TestNote
@enduml

````

http://www.plantuml.com/plantuml/png/VOwz3e8m58NtFiK9pWum4aA8xaxkfihb9vIMjBU9lhq5QsmqSRtt-yuvZMDfsSzAk6dKYxHoXZPC1tcRUckyRez66OkT6lk1hyhJVx2g79Cbmu-5shgEtZBgIOWL1-nwWEaGcfboV1abCYR75wOx5rbq57KVfK291Cep8RRxEx3481sIq6sdIw4YGiaZnxwEprUfqL1Xzk--SsW-1K8qf5i_goS0

commented Jul 29 by The-Lu (10,120 points)

Hello All,

Then 'stereotyped notes' on State diagram is :

  • OK by skinparam for normal note
  • KO by skinparam for note on link
  • and KO by stereotype style.
For similar defect, see also:
@PlantUML: is it necessary or not to open a new defect?

Regards,
Th.
...