structurizr / java

Structurizr for Java
https://docs.structurizr.com/java
Apache License 2.0
1.01k stars 288 forks source link

Implied relationships for some filtered views aren't rendered #307

Closed richhosek closed 4 months ago

richhosek commented 4 months ago

Expected

When I create a filtered view, I expect to see all relationships and implied relationships that match the filter.

Actual

For some implied relationships, the relationship does not render.

Steps to reproduce

workspace {

    model {
        buyer = person "Buyer" {
            tags "Person,Setup,Payment"
        }
        paymentflow = softwareSystem "Payment Flow" {
            buyerapps = container "Buyer Portal / BuyerApp / Branch (ASAP)" {
                tags "Setup,Payment"
                achprofile = component "ACH (Profile)" {
                    tags "Setup"
                }
                ccprofile = component "Credit Card (Profile)" {
                    tags "Setup"
                }
                ppprofile = component "PayPal (Profile)" {
                    tags "Setup"
                }
                achpayment = component "ACH Payment" {
                    tags "Payment"
                }
                creditpayment = component "Credit Payment" {
                    tags "Payment"
                }
                btpayment = component "Brain Tree Payment" {
                    tags "Payment"
                }
            }
        }
        buyer -> achprofile "Uses" "" "Setup"
        buyer -> ccprofile "Uses" "" "Setup"
        buyer -> ppprofile "Uses" "" "Setup"
        buyer -> achpayment "Uses" "" "Payment"
        buyer -> creditpayment "Uses" "" "Payment"
        buyer -> btpayment "Uses" "" "Payment"
    }   

    views {
        systemLandscape "Buyer"  {

            include *
        }
        container paymentflow pfview "Payment Flow" {
            include *
        }

        filtered pfview include "Payment" "pfviewpayment" 
        filtered pfview include "Setup" "pfviewsetup"
        filtered pfview include "Element,Relationship" "pfviewall"

        component buyerapps baview "Buyer Apps" {
            include *
        }

        filtered baview include "Payment" "baviewpayment"
        filtered baview include "Setup" "baviewsetup"   
        filtered baview include "Element,Relationship" "baviewall"

        styles {
            element "Person" {
                shape person
            }
        }
    }
    configuration {
        scope none
    }
}

Version/build information

Structurizr Lite com.structurizr.lite.StructurizrLite : - build: 2024.03.03 (2024-03-03T10:05:43Z) com.structurizr.lite.StructurizrLite : - structurizr-java: v2.1.1 com.structurizr.lite.StructurizrLite : - structurizr-dsl: v2.1.1 com.structurizr.lite.StructurizrLite : - structurizr-import: v2.1.1 com.structurizr.lite.StructurizrLite : - structurizr-graphviz: v2.1.1

Severity

Major

Priority

I have no budget and there's no rush, please fix this for free

More information

No response

richhosek commented 4 months ago

Further investigation indicates it's related to the alphabetical order of the tag names. The one that comes first alphabetically does NOT render its filtered implied relationships. The one that comes second DOES...

simonbrowndotje commented 4 months ago

This is working as expected ... the implied relationships feature creates a relationship between buyer and buyerapps from buyer -> achprofile "Uses" "" "Setup". After this, no more relationships between buyer and buyerapps are created. There are several options to achieve what you're trying to do:

Moving to a discussion...