2

I try to create a diagram which contains the class hierarchy as well as use cases which use the classes. I tried to use PlantUML today, but somehow one cannot mix these two diagram types. This is the simplest file I could come up with:

@startuml
class Foo
usecase Bar
@enduml

When I only have one of these lines in there, it works fine. But with both lines I get this:

❯ plantuml text.txt
Error line 5 in file: text.txt
Some diagram description contains errors

Is there some way to put both into the diagram, or is that just impossible?

Martin Ueding
  • 8,245
  • 6
  • 46
  • 92

1 Answers1

4

I had used PlantUML 1.2021.0. This apparently doesn't contain the allowmixing feature, that the current version 1.2021.14 supports. Upgrading the software and adding allowmixing to the file cures this problem.

@startuml
allowmixing
class Foo
usecase Bar
@enduml

enter image description here

Fuhrmanator
  • 11,459
  • 6
  • 62
  • 111
Martin Ueding
  • 8,245
  • 6
  • 46
  • 92