val:ProcessRoutingProcessStepMustHaveAtMostOneTarget
a sh:NodeShape ;
sh:message "`ProcessStep` in `Routing` for `Process` **MUST** have at most one `TargetRef`." ;
sh:targetClass mt:ProcessStep ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:select """
SELECT ?this WHERE {
?process a mt:Process .
?process mt:hasRouting ?routing .
?routing mt:hasProcessStep ?this .
{
SELECT ?this (COUNT(?target) AS ?targetCount) WHERE {
?this mt:hasTarget ?target .
}
GROUP BY ?this
HAVING (?targetCount > 1)
}
}
""" ;
] .