Can a component be part of several parent components?

+1 vote
asked Jul 12, 2017 in Bug by boshka (3,960 points)
edited Jul 17, 2017 by boshka

is there a way to achieve this?

 

@startuml
 
title Components - Component Diagram
 
component "parent 1" as parent1 {
 
    component "a" as a {
    }
    
    component "b (common)" as b {
    }
 
}
 
component "parent 2" as parent2 {
 
    component "b (common)" as b {
    }
    
    component "c" as c {
    }    
 
}
 
@enduml
 
Current result looks wrong anyway:
1. component c is not under parent 2
2. parent 2 should be outlined the way it includes component b, while parent 1 should be outlined to include component b too.
 
 
UPD: 17.07.17: Here is what I expect (general idea, representation may vary):
Also, I still want to address it as b, not b2
 
 

1 Answer

0 votes
answered Jul 12, 2017 by Serge Wenger Work (15,620 points)

Hello,

i'm not sure what you want but a workaround is :

@startuml
title Components - Component Diagram
 
component "parent 1" as parent1 {
 
    component "a" as a {
    }
    
    component "b (common)" as b {
    }
 
}
 
component "parent 2" as parent2 {
 
    component "b (common)" as b2 {
    }
    
    component "c" as c {
    }    
 
}
@enduml
commented Jul 17, 2017 by boshka (3,960 points)
Hi!
I added an image to show what i expect it to look like. Other architectural tools allow this.
commented Jul 28, 2017 by Serge Wenger Work (15,620 points)
Hi, I never see this before and I don't know how to do it with PlantUML.
...