I'm struggling with the ordering of complex components that interface to each other. First of all, I want to "export" certain interfaces to the outside of my super components with a horizontal line to the "owning" sub components. This does not seem to be possible out-of-the box, so I'm using !pragma horizontalLineBetweenDifferentPackageAllowed. That helps a bit, but there is something weird going on with where the connecting components are placed. The below example should illustrate some of the issues. I'd provide an output image, too, but apparently I'm too dumb to figure our how... Essentially, the problem is that "Another System" appears to the right of "A system", with interface connections crossing over to the left-hand-side. Obviously, it would be better to put "Another System" on the left. Also, aStateDb and aNetwork are swapped around for no apparent reason.
If I mess around with the ordering of the items, using or not using "left" and "right" etc, the image changes, but I can't seem to find any way to make it look right. Defining the interfaces inside the super component does not really help a lot, either.
@startuml
!pragma horizontalLineBetweenDifferentPackageAllowed
component "A System" {
database "Configuration" as aConfigDb
database "Observations" as aDataDb
database "Data\n----\nStatus" as aStateDb
[Inversion] as aNetwork
aDataDb -up-> aNetwork
aNetwork -left-> aStateDb
aConfigDb --> aNetwork
}
() "Spread\nconfiguration" as config
aConfigDb -left- config
() "Output\nData" as data
aStateDb -left- data
component "Another System" {
[Config\nReceiver] as receiver1
[Config\nReceiver] as receiver2
receiver1 -[hidden]- receiver2
}
receiver1 -right-( config
receiver2 -right-( data
@enduml
[ Edit ]
Here is an image generaterd as per the instruction in the blow comment: