How do I use component key word and use it in packages and nodes etc...?

0 votes
asked Nov 22, 2017 in Bug by Ajay
I want to use the feature that allows me to use the component  keyword to define a component.

[Another component] as Comp2

The problem is how do I use this along with package, node, folder, frame, cloud, database.

But when I do this.

@startuml

component [Service 1] as s1

package "ServicesLayer" {

    package "Java based services" {

        s1

    }

}

@enduml

I get an error. Is this a limitation of PlantUML?

1 Answer

0 votes
answered Nov 23, 2017 by Serge Wenger Work (15,620 points)
 
Best answer

Hello,

You can write:

@startuml

package "ServicesLayer" {

    package "Java based services" {

        component [Service 1] as s1

    }

}

@enduml

http://www.plantuml.com/plantuml/png/SoWkIImgAStDuIf8JCvEJ4zLK0fEBIhBJ4ujzaciJ2rIKgZcub800hYqLs9Pea9IOd5gYa8nL2LO4MToVcv1VbvgNeb2DDG81SDOXSHYXM93Y16rN5orN0wfUIb0wm00

...