Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Exclude relationship behaviour doesn't work as expected when there are multiple implied relationships #307

Closed Answered by simonbrowndotje
max-arshinov asked this question in Q&A
Discussion options

You must be logged in to vote

Yes - if you inspect the model (e.g. the JSON version of the workspace), you'll see that relationship 4 -> 2 does not get propagated to the system level, which is as designed with CreateImpliedRelationshipsUnlessAnyRelationshipExistsStrategy. You'll need to use a different implied relationships strategy if you want different behaviour; for example:

workspace {

    !script groovy {
        workspace.model.impliedRelationshipsStrategy = new com.structurizr.model.CreateImpliedRelationshipsUnlessSameRelationshipExistsStrategy();        
    }

    model {
        customer = person "User"
        
        system1 = softwareSystem "System 1" {
            container1 = container "Container 1"
 …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@simonbrowndotje
Comment options

Answer selected by max-arshinov
@max-arshinov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #306 on July 20, 2023 07:17.