Multiple dependencies on other software system
Closed this issue · 6 comments
When we have multiple dependencies on another system, the diagrams just show one of them. Probably will be too much clutter to show all of them on the connecting lines.
But in the dependencies table, we also only see one of the descriptions. This could be solved by showing multiple rows in the table maybe.
I @bluecitylights, thanks for your issue. Could you please add an example model which demonstrates the situation you're describing?
I think this is probably down to how the Structurizr DSL works. It is designed to only encode the first instance of a relationship it comes across in the DSL file and ignore any other matching relationships. Dynamic diagrams ( which are not supported in C4-PlantUML ) are the way to go to show an instance of a relationship.
https://dev.to/simonbrown/modelling-multiple-relationships-51bf
@dirkgroot
I think this dependencies table is generated by site-generator.
We probably can display multiple relations from syste1 to system2 by adding multiple rows.
workspace {
!docs doc
!adrs adr
!identifiers hierarchical
model {
system1 = softwareSystem "System1" {
cont = container "container 1.1"{
}
}
system2 = softwareSystem "System2"{
cont21 = container "container 2.1"
cont22 = container "container 2.2"
}
system1.cont -> system2.cont21 "rel1"
system1.cont -> system2.cont22 "rel2"
}
views {
systemLandscape "SystemLandscape" {
include *
autolayout
}
systemContext system1 "system1" {
include *
autolayout
}
}
}
While the dependencies table is generated by site-generatr it can only use the information that is in the model after it has been parsed by the Structurizr DSL. The dependencies table also only shows system to system relationships.
By default the Structurizr DSL will create implied relationships where none already exist and then add them to the model. In your sample dsl you are doing container to container relationships and the DSL parser is adding in a system to system relationship but it will only add one of them ( based on the first one it encounters in the file ). This is why you only see a single line in the dependencies table.
You could add the following to the top of your DSL file which will change the strategy used for building the implied relationships. But also causes those lines to show on the diagrams as well as in the table which can lead to very cluttered diagrams.
!script groovy {
workspace.model.impliedRelationshipsStrategy = new com.structurizr.model.CreateImpliedRelationshipsUnlessSameRelationshipExistsStrategy()
}
This works indeed, thanks.