Reference participants using aliases in procedures

0 votes
asked Oct 28, 2020 in Wanted features by Leo
commented Oct 28, 2020 by Leo

2 Answers

0 votes
answered Oct 28, 2020 by Serge Wenger Work (14,580 points)

The 2 defined types for arguments are int and string. So add "alice" and it is working well:

See on PlantUML Server

or use !unquoted procedure

See on PlantUML Server 

0 votes
answered Oct 28, 2020 by The-Lu (37,840 points)

Hello L.,

With !procedure or !function, we must use double or simple quote for arguments.

@startuml
!procedure note_over($target, $note)
  note over $target: $note
!endprocedure

participant "Alice" as alice
note_over("alice", "some note")
@enduml


[See on PlantUML server]

Or explicitly mention '!unquoted':

@startuml
!unquoted procedure note_over($target, $note)
  note over $target: $note
!endprocedure

participant "Alice" as alice
note_over(alice, "some note")
note_over(alice, other note)
@enduml


[See on PlantUML server]

If that can help,
Regards,
Th.

...