Linked.Archi

Linked.Archi ArchiMate 4.0 Architecture Principle Shapes

SHACL Shapes

https://meta.linked.archi/archimate4/principle-shapes#

v4.0 draft am4psh: Kalin Maldzhanski Linked.Archi Modified: 2026-11-06 License

SHACL shapes encoding common enterprise architecture principles as executable constraints. Adapted from 3.2 principle shapes for ArchiMate 4.0 domain-based structure.

Contents

ApplicationComponentOwnershipShape — target: ApplicationComponent

SPARQL constraint: Application component {$this} has no business actor or role associated with it as its owner. Warning
            SELECT $this
            WHERE {
                $this a am4:ApplicationComponent .
                FILTER NOT EXISTS {
                    { ?owner am4:associatedWith $this . } UNION { $this am4:associatedWith ?owner . }
                    { ?owner a am4:BusinessActor . } UNION { ?owner a am4:Role . }
                }
            }
        

ApplicationComponentWithoutServiceShape — target: ApplicationComponent

SPARQL constraint: Application component {$this} does not expose any service. Info
            SELECT $this
            WHERE {
                $this a am4:ApplicationComponent .
                FILTER NOT EXISTS {
                    $this am4:realizes ?svc .
                    ?svc a am4:Service .
                }
            }
        

BusinessProcessDirectTechnologyDependencyShape — target: Process

SPARQL constraint: Business process {$this} has a direct serving/realization dependency on technology element {?tech}. Introduce an application domain mediator. Warning
            SELECT $this ?tech
            WHERE {
                $this a am4:Process .
                # Business: performed by a business actor, directly or through a role.
                FILTER EXISTS {
                    ?actor a am4:BusinessActor .
                    { ?actor am4:assignedTo $this . }
                    UNION
                    { ?actor am4:assignedTo ?role . ?role a am4:Role ; am4:assignedTo $this . }
                }
                {
                    ?tech am4:serves $this .
                } UNION {
                    ?tech am4:realizes $this .
                }
                ?tech rdf:type/rdfs:subClassOf* am4:TechnologyDomainElement .
            }
        

CapabilityWithoutBehaviorRealizationShape — target: Capability

SPARQL constraint: Capability {$this} is not realized by any process, function, or interaction. Warning
            SELECT $this
            WHERE {
                $this a am4:Capability .
                FILTER NOT EXISTS {
                    ?behavior am4:realizes $this .
                    ?behavior rdf:type/rdfs:subClassOf* am4:BehaviorElement .
                }
            }
        

CapabilityWithoutGoalShape — target: Capability

SPARQL constraint: Capability {$this} is not linked to any goal or outcome. Info
            SELECT $this
            WHERE {
                $this a am4:Capability .
                FILTER NOT EXISTS {
                    {
                        $this am4:realizes ?goal .
                        { ?goal a am4:Goal . } UNION { ?goal a am4:Outcome . }
                    } UNION {
                        ?goal am4:serves $this .
                        { ?goal a am4:Goal . } UNION { ?goal a am4:Outcome . }
                    } UNION {
                        $this am4:associatedWith ?goal .
                        { ?goal a am4:Goal . } UNION { ?goal a am4:Outcome . }
                    }
                }
            }
        

CompositionMultipleParentWarning

SPARQL constraint: Element {$this} is composed into multiple parents via am4:composedOf. Composition implies existence dependency — a part with multiple composites may indicate a modelling issue (ArchiMate 4 §5.1.2). Warning
   PREFIX am4: <https://meta.linked.archi/archimate4/onto#>
   SELECT $this (COUNT(?parent) AS ?parentCount)
   WHERE {
    ?parent am4:composedOf $this .
   }
   GROUP BY $this
   HAVING (COUNT(?parent) > 1)
  

CriticalNodeSingleDeploymentShape — target: ApplicationComponent

SPARQL constraint: Application component {$this} is deployed on only one node ({?node}). Consider multi-node deployment for resilience. Info
            SELECT $this ?node
            WHERE {
                $this a am4:ApplicationComponent .
                # Deployed on a node: the node realizes the component, or is assigned to an
                # artifact or system software that does.
                ?node (am4:realizes|am4:assignedTo/am4:realizes) $this .
                ?node a am4:Node .
                FILTER NOT EXISTS {
                    ?node2 (am4:realizes|am4:assignedTo/am4:realizes) $this .
                    ?node2 a am4:Node .
                    FILTER(?node2 != ?node)
                }
            }
        

DataObjectStewardshipShape — target: DataObject

SPARQL constraint: Data object {$this} has no application component assigned to it or accessing it. Assign a system of record. Warning
            SELECT $this
            WHERE {
                $this a am4:DataObject .
                FILTER NOT EXISTS {
                    ?app a am4:ApplicationComponent .
                    {
                        ?app am4:accesses $this .
                    } UNION {
                        ?app am4:assignedTo $this .
                    }
                }
            }
        

DirectComponentToComponentServingShape — target: ApplicationComponent

SPARQL constraint: Application component {$this} directly serves another application component {?target} without an intermediary service. Warning
            SELECT $this ?target
            WHERE {
                $this a am4:ApplicationComponent .
                $this am4:serves ?target .
                ?target a am4:ApplicationComponent .
            }
        

ExcessiveTechnologyDiversityPerServiceShape — target: Service

SPARQL constraint: Service {$this} depends on {?nodeCount} distinct technology nodes. Consider standardizing. Info
            SELECT $this (COUNT(DISTINCT ?node) AS ?nodeCount)
            WHERE {
                $this a am4:Service .
                ?app am4:realizes $this .
                ?app a am4:ApplicationComponent .
                # Technology it depends on: serving or realizing the component, or hosting
                # what realizes it (a node assigned to an artifact or system software).
                ?node (am4:serves|am4:realizes|am4:assignedTo/am4:realizes) ?app .
                ?node rdf:type/rdfs:subClassOf* am4:TechnologyDomainElement ,
                                              am4:ActiveStructureElement .
            }
            GROUP BY $this
            HAVING (COUNT(DISTINCT ?node) > 3)
        

FunctionAutomatedByMultipleApplicationsShape — target: Function

SPARQL constraint: Function {$this} is automated by multiple application components ({?app1} and {?app2}). Clarify which component is authoritative. Warning
            SELECT $this ?app1 ?app2
            WHERE {
                $this a am4:Function .
                ?app1 a am4:ApplicationComponent ;
                      am4:assignedTo $this .
                ?app2 a am4:ApplicationComponent ;
                      am4:assignedTo $this .
                FILTER(STR(?app1) < STR(?app2))
            }
        

OrphanedElementShape — target: AndJunction

SPARQL constraint: Element {$this} has no relationships to any other element. Info
            SELECT $this
            WHERE {
                $this a/rdfs:subClassOf* arch:Element .
                # MINUS, not FILTER NOT EXISTS: the same results, without testing every
                # element against every other one — which grows with the square of the model.
                MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
                MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
            }
        
SPARQL constraint: Element {$this} has no relationships to any other element. Info
            SELECT $this
            WHERE {
                $this a/rdfs:subClassOf* arch:Element .
                # MINUS, not FILTER NOT EXISTS: the same results, without testing every
                # element against every other one — which grows with the square of the model.
                MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
                MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
            }
        
SPARQL constraint: Element {$this} has no relationships to any other element. Info
            SELECT $this
            WHERE {
                $this a/rdfs:subClassOf* arch:Element .
                # MINUS, not FILTER NOT EXISTS: the same results, without testing every
                # element against every other one — which grows with the square of the model.
                MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
                MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
            }
        
SPARQL constraint: Element {$this} has no relationships to any other element. Info
            SELECT $this
            WHERE {
                $this a/rdfs:subClassOf* arch:Element .
                # MINUS, not FILTER NOT EXISTS: the same results, without testing every
                # element against every other one — which grows with the square of the model.
                MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
                MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
            }
        
SPARQL constraint: Element {$this} has no relationships to any other element. Info
            SELECT $this
            WHERE {
                $this a/rdfs:subClassOf* arch:Element .
                # MINUS, not FILTER NOT EXISTS: the same results, without testing every
                # element against every other one — which grows with the square of the model.
                MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
                MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
            }
        
SPARQL constraint: Element {$this} has no relationships to any other element. Info
            SELECT $this
            WHERE {
                $this a/rdfs:subClassOf* arch:Element .
                # MINUS, not FILTER NOT EXISTS: the same results, without testing every
                # element against every other one — which grows with the square of the model.
                MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
                MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
            }
        
SPARQL constraint: Element {$this} has no relationships to any other element. Info
            SELECT $this
            WHERE {
                $this a/rdfs:subClassOf* arch:Element .
                # MINUS, not FILTER NOT EXISTS: the same results, without testing every
                # element against every other one — which grows with the square of the model.
                MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
                MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
            }
        
SPARQL constraint: Element {$this} has no relationships to any other element. Info
            SELECT $this
            WHERE {
                $this a/rdfs:subClassOf* arch:Element .
                # MINUS, not FILTER NOT EXISTS: the same results, without testing every
                # element against every other one — which grows with the square of the model.
                MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
                MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
            }
        
SPARQL constraint: Element {$this} has no relationships to any other element. Info
            SELECT $this
            WHERE {
                $this a/rdfs:subClassOf* arch:Element .
                # MINUS, not FILTER NOT EXISTS: the same results, without testing every
                # element against every other one — which grows with the square of the model.
                MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
                MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
            }
        
SPARQL constraint: Element {$this} has no relationships to any other element. Info
            SELECT $this
            WHERE {
                $this a/rdfs:subClassOf* arch:Element .
                # MINUS, not FILTER NOT EXISTS: the same results, without testing every
                # element against every other one — which grows with the square of the model.
                MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
                MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
            }
        
SPARQL constraint: Element {$this} has no relationships to any other element. Info
            SELECT $this
            WHERE {
                $this a/rdfs:subClassOf* arch:Element .
                # MINUS, not FILTER NOT EXISTS: the same results, without testing every
                # element against every other one — which grows with the square of the model.
                MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
                MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
            }
        
SPARQL constraint: Element {$this} has no relationships to any other element. Info
            SELECT $this
            WHERE {
                $this a/rdfs:subClassOf* arch:Element .
                # MINUS, not FILTER NOT EXISTS: the same results, without testing every
                # element against every other one — which grows with the square of the model.
                MINUS { $this ?p ?other . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
                MINUS { ?other ?p $this . ?other a ?otherType . ?otherType rdfs:subClassOf* arch:Element . }
            }
        

ProcessAutomatedByMultipleApplicationsShape — target: Process

SPARQL constraint: Process {$this} is automated by multiple application components ({?app1} and {?app2}). Clarify which component is authoritative. Warning
            SELECT $this ?app1 ?app2
            WHERE {
                $this a am4:Process .
                ?app1 a am4:ApplicationComponent ;
                      am4:assignedTo $this .
                ?app2 a am4:ApplicationComponent ;
                      am4:assignedTo $this .
                FILTER(STR(?app1) < STR(?app2))
            }
        

ProcessPerformerShape — target: Process

SPARQL constraint: Process {$this} has nothing assigned to perform it (an actor, a role or a component). Warning
            SELECT $this
            WHERE {
                $this a am4:Process .
                FILTER NOT EXISTS {
                    ?performer am4:assignedTo $this .
                    ?performer rdf:type/rdfs:subClassOf* am4:ActiveStructureElement .
                }
            }
        

RedundancyAvoidanceShape — target: Service

SPARQL constraint: Multiple components realize the same service — potential redundancy. Warning
            SELECT $this (COUNT(DISTINCT ?comp) AS ?count) WHERE {
                ?comp am4:realizes $this .
                ?comp rdf:type/rdfs:subClassOf* am4:InternalActiveStructureElement .
            }
            GROUP BY $this
            HAVING (COUNT(DISTINCT ?comp) > 1)
        

RedundantApplicationRealizingServiceShape — target: Service

SPARQL constraint: Service {$this} is realized by multiple application components ({?app1} and {?app2}). Warning
            SELECT $this ?app1 ?app2
            WHERE {
                $this a am4:Service .
                ?app1 a am4:ApplicationComponent ;
                      am4:realizes $this .
                ?app2 a am4:ApplicationComponent ;
                      am4:realizes $this .
                FILTER(STR(?app1) < STR(?app2))
            }
        

RedundantFunctionRealizationShape — target: Function

SPARQL constraint: Function {$this} is served by multiple application components ({?app1} and {?app2}). Warning
            SELECT $this ?app1 ?app2
            WHERE {
                $this a am4:Function .
                ?app1 a am4:ApplicationComponent ;
                      am4:serves $this .
                ?app2 a am4:ApplicationComponent ;
                      am4:serves $this .
                FILTER(STR(?app1) < STR(?app2))
            }
        

RequirementWithoutRealizationShape — target: Requirement

SPARQL constraint: Requirement {$this} is not realized by any architecture element. Warning
            SELECT $this
            WHERE {
                $this a am4:Requirement .
                FILTER NOT EXISTS {
                    ?element am4:realizes $this .
                    FILTER NOT EXISTS {
                        ?element rdf:type/rdfs:subClassOf* am4:MotivationElement .
                    }
                }
            }
        

ServiceWithoutRealizationShape — target: Service

SPARQL constraint: Service {$this} is not realized by anything. Warning
            SELECT $this
            WHERE {
                $this a am4:Service .
                FILTER NOT EXISTS {
                    ?realizer am4:realizes $this .
                }
            }
        

SingleBusinessObjectOwnerShape — target: BusinessObject

SPARQL constraint: Business object {$this} is accessed by multiple application components ({?app1} and {?app2}). Clarify ownership. Warning
            SELECT $this ?app1 ?app2
            WHERE {
                $this a am4:BusinessObject .
                ?app1 a am4:ApplicationComponent ;
                      am4:accesses $this .
                ?app2 a am4:ApplicationComponent ;
                      am4:accesses $this .
                FILTER(STR(?app1) < STR(?app2))
            }
        

SingleDataWriterShape — target: DataObject

SPARQL constraint: Data object {$this} is written by multiple application components ({?app1} and {?app2}). Designate a single authoritative source. Warning
            SELECT DISTINCT $this ?app1 ?app2
            WHERE {
                $this a am4:DataObject .
                # A writer: write or read/write access, or an access not stated to be a read.
                ?app1 a am4:ApplicationComponent .
                {
                    ?app1 am4:accesses $this .
                    FILTER NOT EXISTS { ?read1 a am4:ReadAccess ; arch:source ?app1 ; arch:target $this . }
                } UNION {
                    ?write1 a ?kind1 ; arch:source ?app1 ; arch:target $this .
                    FILTER(?kind1 IN (am4:WriteAccess, am4:ReadWriteAccess))
                }
                ?app2 a am4:ApplicationComponent .
                {
                    ?app2 am4:accesses $this .
                    FILTER NOT EXISTS { ?read2 a am4:ReadAccess ; arch:source ?app2 ; arch:target $this . }
                } UNION {
                    ?write2 a ?kind2 ; arch:source ?app2 ; arch:target $this .
                    FILTER(?kind2 IN (am4:WriteAccess, am4:ReadWriteAccess))
                }
                FILTER(STR(?app1) < STR(?app2))
            }
        

SinglePointOfFailureShape — target: Service

SPARQL constraint: Service {$this} is realized by only one application component ({?app}). Consider redundancy for critical services. Info
            SELECT $this ?app
            WHERE {
                $this a am4:Service .
                ?app am4:realizes $this .
                ?app a am4:ApplicationComponent .
                FILTER NOT EXISTS {
                    ?app2 am4:realizes $this .
                    ?app2 a am4:ApplicationComponent .
                    FILTER(?app2 != ?app)
                }
            }
        

TechnologyServingBusinessDirectlyShape — target: Node

SPARQL constraint: Technology node {$this} directly serves business element {?biz}. Route through the application domain. Warning
            SELECT $this ?biz
            WHERE {
                $this a am4:Node .
                $this am4:serves ?biz .
                ?biz rdf:type/rdfs:subClassOf* am4:BusinessDomainElement .
            }