What the error in code plantuml ?

0 votes
asked Jul 15, 2023 in Bug by ELIEZER
@startuml
left to right direction

package "Boundaries" {
    rectangle "Territory Boundaries" as TerritoryBoundaries
    rectangle "Housing Unit Boundaries" as HousingUnitBoundaries
}

actor "Territory Server" as TerritoryServer
actor "Publisher" as Publisher
actor "Resident" as Resident

class "Territory" as Territory {
    + attribute1 : type
    + attribute2 : type
}

class "Housing Unit" as HousingUnit {
    + attribute3 : type
    + attribute4 : type
}

class "Additional Class 1" as AdditionalClass1 {
    + attribute5 : type
    + attribute6 : type
}

class "Additional Class 2" as AdditionalClass2 {
    + attribute7 : type
    + attribute8 : type
}

TerritoryServer --> Territory
TerritoryServer --> HousingUnit
Publisher --> Territory
Publisher --> HousingUnit
Resident --> HousingUnit

TerritoryBoundaries -- Territory
HousingUnitBoundaries -- HousingUnit

@enduml

1 Answer

0 votes
answered Jul 15, 2023 by albert (3,520 points)

looks like you mixing 2 types of diagrams, in that case you have to use allow_mixing like:

@startuml
left to right direction
allow_mixing
package "Boundaries" {
    rectangle "Territory Boundaries" as TerritoryBoundaries
    rectangle "Housing Unit Boundaries" as HousingUnitBoundaries
}
...
 

...