Linked.Archi

Linked.Archi ArchiMate 4.0 Element & Metamodel Shapes

SHACL Shapes

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

v4.0 draft am4elsh: Kalin Maldzhanski Linked.Archi Modified: 2026-04-29 License

SHACL shapes for validating ArchiMate 4.0 element instances and metamodel patterns. Adapted from 3.2 shapes for the domain-based structure of 4.0. Draft — needs validation against the ArchiMate 4.0 relationship validity matrix.

Contents

AccessSourceConstraint

SPARQL constraint: Access can only originate from behavior elements. Violation
            SELECT $this WHERE {
                $this am4:accesses ?target .
                FILTER NOT EXISTS {
                    $this rdf:type/rdfs:subClassOf* am4:BehaviorElement .
                }
            }
        

AccessTargetConstraint

SPARQL constraint: Access can only target passive structure elements. Violation
            SELECT $this WHERE {
                ?source am4:accesses $this .
                FILTER NOT EXISTS {
                    $this rdf:type/rdfs:subClassOf* am4:PassiveStructureElement .
                }
            }
        

AccessTypeShape — target: Access

PropertyConstraintValueSeverityMessage
accessType datatype string Violation
accessType in 7f942e52a74ead5a Violation
accessType maxCount 1 Violation

ArchiMateElementShape — target: Element

PropertyConstraintValueSeverityMessage
prefLabel datatype langString Violation
prefLabel minCount 1 Violation

AssignmentSourceConstraint

SPARQL constraint: Assignment can only originate from active structure elements. Violation
            SELECT $this WHERE {
                $this am4:assignedTo ?target .
                FILTER NOT EXISTS {
                    $this rdf:type/rdfs:subClassOf* am4:ActiveStructureElement .
                }
            }
        

AssignmentTargetConstraint

SPARQL constraint: Assignment can only target behavior elements. Violation
            SELECT $this WHERE {
                ?source am4:assignedTo $this .
                FILTER NOT EXISTS {
                    $this rdf:type/rdfs:subClassOf* am4:BehaviorElement .
                }
            }
        

CompositionPartUniquenessShape

SPARQL constraint: A composed part can only belong to one whole (composition implies exclusive ownership). Violation
            SELECT $this WHERE {
                ?whole1 am4:composedOf $this .
                ?whole2 am4:composedOf $this .
                FILTER(?whole1 != ?whole2)
            }
        

DeepSpecializationChainShape

SPARQL constraint: Element has a deep specialization chain (5+ levels) — consider if this complexity is necessary. Info
            SELECT $this WHERE {
                $this am4:specializes+ ?t1 .
                ?t1 am4:specializes+ ?t2 .
                ?t2 am4:specializes+ ?t3 .
                ?t3 am4:specializes+ ?t4 .
            }
        

FlowSourceConstraint

SPARQL constraint: Flow can only originate from behavior elements (not motivation elements). Violation
            SELECT $this WHERE {
                $this am4:flowsTo ?target .
                FILTER NOT EXISTS {
                    $this rdf:type/rdfs:subClassOf* am4:BehaviorElement .
                }
            }
        

FlowTargetConstraint

SPARQL constraint: Flow can only target behavior elements (not motivation elements). Violation
            SELECT $this WHERE {
                ?source am4:flowsTo $this .
                FILTER NOT EXISTS {
                    $this rdf:type/rdfs:subClassOf* am4:BehaviorElement .
                }
            }
        

InfluenceStrengthShape — target: Influence

PropertyConstraintValueSeverityMessage
influenceStrength datatype string Violation
influenceStrength in 7f942e52a74ead5f Violation
influenceStrength maxCount 1 Violation

JunctionTypeShape — target: AndJunction

SPARQL constraint: All relationships connected to an AndJunction must be of the same type. Violation
            SELECT $this WHERE {
                {
                    ?a ?rel1 $this .
                    ?b ?rel2 $this .
                } UNION {
                    $this ?rel1 ?a .
                    $this ?rel2 ?b .
                } UNION {
                    ?a ?rel1 $this .
                    $this ?rel2 ?b .
                }
                ?rel1 rdfs:subPropertyOf* am4:composedOf .
                FILTER NOT EXISTS {
                    ?rel2 rdfs:subPropertyOf* am4:composedOf .
                }
                FILTER(?rel1 != ?rel2)
            }
        

MotivationNoFlowShape

SPARQL constraint: Motivation elements cannot participate in flow relationships. Violation
            SELECT $this WHERE {
                $this am4:flowsTo ?target .
                $this rdf:type/rdfs:subClassOf* am4:MotivationElement .
            }
        

MotivationNoTriggeringShape

SPARQL constraint: Motivation elements cannot participate in triggering relationships. Violation
            SELECT $this WHERE {
                $this am4:triggers ?target .
                $this rdf:type/rdfs:subClassOf* am4:MotivationElement .
            }
        

NoCircularAggregationShape

SPARQL constraint: Circular aggregation is not allowed. Violation
            SELECT $this WHERE { $this am4:aggregates+ $this . }
        

NoCircularCompositionShape

SPARQL constraint: Circular composition is not allowed. Violation
            SELECT $this WHERE { $this am4:composedOf+ $this . }
        

NoSelfAggregationShape

SPARQL constraint: An element cannot aggregate itself. Violation
SELECT $this WHERE { $this am4:aggregates $this . }

NoSelfCompositionShape

SPARQL constraint: An element cannot compose itself. Violation
SELECT $this WHERE { $this am4:composedOf $this . }

NoSelfSpecializationShape

SPARQL constraint: An element cannot specialize itself. Violation
SELECT $this WHERE { $this am4:specializes $this . }

OrJunctionTypeShape — target: OrJunction

SPARQL constraint: All relationships connected to an OrJunction must be of the same type. Violation
            SELECT $this WHERE {
                {
                    ?a ?rel1 $this .
                    ?b ?rel2 $this .
                } UNION {
                    $this ?rel1 ?a .
                    $this ?rel2 ?b .
                } UNION {
                    ?a ?rel1 $this .
                    $this ?rel2 ?b .
                }
                ?rel1 rdfs:subPropertyOf* am4:composedOf .
                FILTER NOT EXISTS {
                    ?rel2 rdfs:subPropertyOf* am4:composedOf .
                }
                FILTER(?rel1 != ?rel2)
            }
        

SpecializationSameTypeShape

SPARQL constraint: Specialization must connect elements of the same ArchiMate type. Violation
            SELECT $this ?target WHERE {
                $this am4:specializes ?target .
                $this rdf:type ?sourceType .
                ?target rdf:type ?targetType .
                ?sourceType rdfs:subClassOf* arch:Element .
                ?targetType rdfs:subClassOf* arch:Element .
                FILTER NOT EXISTS {
                    $this rdf:type ?commonType .
                    ?target rdf:type ?commonType .
                    ?commonType rdfs:subClassOf* arch:Element .
                }
            }
        

TriggeringSourceConstraint

SPARQL constraint: Triggering can only originate from behavior elements (not motivation elements). Violation
            SELECT $this WHERE {
                $this am4:triggers ?target .
                FILTER NOT EXISTS {
                    $this rdf:type/rdfs:subClassOf* am4:BehaviorElement .
                }
            }
        

TriggeringTargetConstraint

SPARQL constraint: Triggering can only target behavior elements (not motivation elements). Violation
            SELECT $this WHERE {
                ?source am4:triggers $this .
                FILTER NOT EXISTS {
                    $this rdf:type/rdfs:subClassOf* am4:BehaviorElement .
                }
            }