aliases don't render in grouping directives

+1 vote
asked May 20, 2015 in Bug by jcollas (130 points)
edited May 20, 2015 by plantuml

For the following UML, I would expect Box 1 to show Request 1 and Request 2 much like Box 2 does. Box 1 shows up empty with Request 1 pointing to Request 2 outside it.

@startuml
[Request 1] as r1
[Request 2] as r2
rectangle "Box 1" {
  r1 -> r2
}
Rectangle "Box 2" {
  [Request 1]
  [Request 2]
}
@enduml

commented Oct 16, 2015 by HenriBasmati (150 points)
I have the same problem, very annoying when you have a lot of aliases for long names (in my case in a usecase diagram).

1 Answer

0 votes
answered Oct 16, 2015 by HenriBasmati (150 points)
edited Oct 17, 2015 by HenriBasmati

Looks like I've just found the solution : you have to declare your aliases inside the grouping directive, and it will also work outside of the package. You can even declare only the aliases in the package. With your example, it would give :

@startuml
rectangle "Box 1" {
  [Request 1] as r1
  [Request 2] as r2
}
r1 -> r2
Rectangle "Box 2" {
  [Request 1]
  [Request 2]
}
@enduml

...