structurizr / dsl

Structurizr DSL
https://docs.structurizr.com/dsl
Apache License 2.0
1.41k stars 266 forks source link

Only first relation is displayed only in container view #169

Closed arthis closed 1 year ago

arthis commented 1 year ago

Hi all,

I am pretty new to C4 modelling, and maybe I am doing something wrong or not possible yet.

I am using the latest version of structurizr on premises from docker :

docker run -d -p 8080:8080 -v /mnt/c/ISAGRI/Archi:/usr/local/structurizr structurizr/onpremises

I am running the following workspace :

!constant DOCUMENTATION_BASE_URL "locahost:8080"

workspace GestionInterne "Gestion Interne - Agenda" {

    model {
        userCabinetComptable = person "SomeUser" "Utilisateur lambda"

        clientSide = softwareSystem "SomeClient" "local" {

            messageApp = container "Message Sending  Application" "fetch/push Nack messages" ".net core app" {
            }

            spaMyApp = container "My application" "spa" "Angular" {
            }
        }

        cloud = softwareSystem "azure cloud"  "internet" {

            apim = container "APIM" "Api management" "Azure" {
                url "http://${DOCUMENTATION_BASE_URL}/docs/general/apim.md"
            }

        }

        clientSide -> cloud "Uses synhronization flows" "Https" 
        clientSide -> cloud "Uses" "Https"

        messageApp -> apim "Uses Synchronization flows" "Https"
        spaMyApp -> apim "Uses" "Https"

    }

    views {

        systemLandscape  overview "overview landscape" {
            include *
        }

        container clientSide containerViewClientSide "Containers Client Side" {
            include *
        }

        container cloud containerViewCloud "Containers Cloud" {
            include *
        }

        theme default
    }

}

I was expecting the containerViewCloud to display both relationships :

Whereas, it is only the first link that is taken is always displayed. Is there something missing in my understanding?

image

for the record here are the other views perfectly well displayed :

system Landscape :

image

container client side :

image

arthis commented 1 year ago

I have found a solution so I will close the issue. You can reopen it if you feel like it is something to address to.

I have added the following to express those relations :

clientSide -> apim "Uses Synchronization flows" "Https"
clientSide -> apim "Uses" "Https"

These will display nicely.

simonbrowndotje commented 1 year ago

I suspect you're seeing this behaviour -> https://github.com/structurizr/dsl/tree/master/docs/cookbook/implied-relationships