Skip to content
RUMLRUML

Open Format for Digital Law

3.6 Operators (DELEGATED validation)

The DELEGATED operator, its binding to a combiner capability, and custom combiners.

delegated--accepts-operator-with-official-combiner

DescriptionA parent node with `operator: "DELEGATED"`, children and one `ruml:expression` entry is valid.
Expectaccept
Layerschema
RUML3-6-operators.fixtures/accept-delegated-operator.ruml
Spec§3.6
3-6-operators.fixtures/accept-delegated-operator.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:expression",
"required": true
}
],
"metadata": {
"id": "ec36948d-fbb2-4815-985a-bd5e9375d934",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "0eb360a6-626a-406d-89a1-9f434ced141b",
"operator": "DELEGATED",
"label": "Mindestens zwei Merkmale erfüllt",
"children": ["2", "3", "4"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Mindestens zwei der drei Merkmale müssen erfüllt sein",
"expression": "$count($children[status = 'true']) >= 2"
}
}
]
},
"2": {
"id": "1a5b7c3d-2e4f-4a6b-8c9d-0e1f2a3b4c5d",
"label": "Merkmal 1"
},
"3": {
"id": "2b6c8d4e-3f5a-4b7c-9d0e-1f2a3b4c5d6e",
"label": "Merkmal 2"
},
"4": {
"id": "3c7d9e5f-4a6b-4c8d-ae1f-2a3b4c5d6e7f",
"label": "Merkmal 3"
}
}
}
}

delegated--accepts-custom-combiner

DescriptionA third-party capability declared at root with `role: "combiner"` may combine a node's children.
Expectaccept
Layersemantic
RUML3-6-operators.fixtures/accept-delegated-custom-combiner.ruml
Spec§3.6§4.1
3-6-operators.fixtures/accept-delegated-custom-combiner.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "org.ruml.test/combiner",
"required": true,
"role": "combiner"
}
],
"metadata": {
"id": "ec36948d-fbb2-4815-985a-bd5e9375d934",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "0eb360a6-626a-406d-89a1-9f434ced141b",
"operator": "DELEGATED",
"label": "Gesamtbewertung",
"children": ["2", "3"],
"capabilities": [
{
"id": "org.ruml.test/combiner",
"payload": {
"description": "Status des ersten Kindes",
"pickChildResult": 1
}
}
]
},
"2": {
"id": "1a5b7c3d-2e4f-4a6b-8c9d-0e1f2a3b4c5d",
"label": "Modul 1"
},
"3": {
"id": "2b6c8d4e-3f5a-4b7c-9d0e-1f2a3b4c5d6e",
"label": "Modul 2"
}
}
}
}

delegated--accepts-nondeterministic-expression

DescriptionA combiner expression MAY use non-deterministic JSONata functions such as `$random`.
Expectaccept
Layersemantic
RUML3-6-operators.fixtures/accept-delegated-nondeterministic-expression.ruml
Spec§3.6§4.14
3-6-operators.fixtures/accept-delegated-nondeterministic-expression.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:expression",
"required": true
}
],
"metadata": {
"id": "99efdf2e-7556-424d-b777-bc1d8acd78ed",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "5b063bad-5c6d-4bc3-968e-72fcf3891ea4",
"operator": "DELEGATED",
"label": "Stichprobe ausgewählt",
"children": ["2", "3", "4"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Bei mindestens zwei erfüllten Merkmalen wird der Fall mit einer Wahrscheinlichkeit von zehn Prozent für die Stichprobe ausgewählt",
"expression": "$count($children[status = 'true']) >= 2 and $random() < 0.1"
}
}
]
},
"2": {
"id": "91b19351-0793-46f5-abaa-fbc59f2e1d96",
"label": "Merkmal 1"
},
"3": {
"id": "e79d475a-96c0-44d8-9d14-5edbf2deb810",
"label": "Merkmal 2"
},
"4": {
"id": "9cfa57f7-4f2a-4abe-8c19-9c88157e4212",
"label": "Merkmal 3"
}
}
}
}

delegated--rejects-operator-without-capability

Description`operator: "DELEGATED"` without any capability entry leaves the node with no combination rule.
Expectreject
Layerschema
RUML3-6-operators.fixtures/reject-delegated-operator-without-capability.ruml
Spec§3.6
Expected rule violationsOP-02
At/rulemap/nodes/1
3-6-operators.fixtures/reject-delegated-operator-without-capability.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"metadata": {
"id": "ec36948d-fbb2-4815-985a-bd5e9375d934",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "0eb360a6-626a-406d-89a1-9f434ced141b",
"operator": "DELEGATED",
"label": "Operator ohne Ausdruck",
"children": ["2"]
},
"2": {
"id": "1a5b7c3d-2e4f-4a6b-8c9d-0e1f2a3b4c5d",
"label": "Merkmal 1"
}
}
}
}

delegated--rejects-combiner-without-combiner-role

DescriptionA third-party capability declared with the `data` role cannot combine children.
Expectreject
Layersemantic
RUML3-6-operators.fixtures/reject-delegated-combiner-without-combiner-role.ruml
Spec§3.6§4.1
Expected rule violationsOP-02
At/capabilities/0/rulemap/nodes/1
3-6-operators.fixtures/reject-delegated-combiner-without-combiner-role.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "org.ruml.test/data",
"required": true,
"role": "data"
}
],
"metadata": {
"id": "ec36948d-fbb2-4815-985a-bd5e9375d934",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "0eb360a6-626a-406d-89a1-9f434ced141b",
"operator": "DELEGATED",
"label": "Kombinierer ohne deklarierte Rolle",
"children": ["2"],
"capabilities": [
{
"id": "org.ruml.test/data",
"payload": {
"description": "Status des ersten Kindes"
}
}
]
},
"2": {
"id": "1a5b7c3d-2e4f-4a6b-8c9d-0e1f2a3b4c5d",
"label": "Modul 1"
}
}
}
}

delegated--rejects-leaf-decider-as-combiner

DescriptionA capability declared `role: "decision"` decides a leaf; it does not consume child results and MUST NOT combine them.
Expectreject
Layersemantic
RUML3-6-operators.fixtures/reject-delegated-leaf-decider-as-combiner.ruml
Spec§3.6§4.1
Expected rule violationsOP-02
At/rulemap/nodes/1
3-6-operators.fixtures/reject-delegated-leaf-decider-as-combiner.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "org.ruml.test/decision",
"required": true,
"role": "decision"
}
],
"metadata": {
"id": "ec36948d-fbb2-4815-985a-bd5e9375d934",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "0eb360a6-626a-406d-89a1-9f434ced141b",
"operator": "DELEGATED",
"label": "Blatt-Entscheider als Kombinierer",
"children": ["2"],
"capabilities": [
{
"id": "org.ruml.test/decision",
"payload": {
"description": "Bonitätsprüfung",
"result": "true"
}
}
]
},
"2": {
"id": "1a5b7c3d-2e4f-4a6b-8c9d-0e1f2a3b4c5d",
"label": "Merkmal 1"
}
}
}
}

delegated--rejects-two-combiners

DescriptionA node carries `ruml:expression` and a third-party combiner side by side; a node carries at most one combiner, even when the two have different ids.
Expectreject
Layersemantic
RUML3-6-operators.fixtures/reject-delegated-two-combiners.ruml
Spec§3.6§4.1
Expected rule violationsOP-02
At/rulemap/nodes/1/capabilities/1
3-6-operators.fixtures/reject-delegated-two-combiners.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:expression",
"required": true
},
{
"id": "org.ruml.test/combiner",
"required": true,
"role": "combiner"
}
],
"metadata": {
"id": "ec36948d-fbb2-4815-985a-bd5e9375d934",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "0eb360a6-626a-406d-89a1-9f434ced141b",
"operator": "DELEGATED",
"label": "Gesamtbewertung",
"children": ["2", "3"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Beide Module bestanden",
"expression": "$count($children[status = 'true']) = 2"
}
},
{
"id": "org.ruml.test/combiner",
"payload": {
"description": "Status des ersten Kindes",
"pickChildResult": 1
}
}
]
},
"2": {
"id": "1a5b7c3d-2e4f-4a6b-8c9d-0e1f2a3b4c5d",
"label": "Modul 1"
},
"3": {
"id": "2b6c8d4e-3f5a-4b7c-9d0e-1f2a3b4c5d6e",
"label": "Modul 2"
}
}
}
}

delegated--rejects-combiner-without-operator

DescriptionA `ruml:expression` entry on a node whose operator is `AND` states two different combination rules.
Expectreject
Layerschema
RUML3-6-operators.fixtures/reject-delegated-combiner-without-operator.ruml
Spec§3.6
Expected rule violationsCAP-08
At/rulemap/nodes/1/operator
3-6-operators.fixtures/reject-delegated-combiner-without-operator.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:expression",
"required": true
}
],
"metadata": {
"id": "ec36948d-fbb2-4815-985a-bd5e9375d934",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "0eb360a6-626a-406d-89a1-9f434ced141b",
"operator": "AND",
"label": "Ausdruck ohne Operator",
"children": ["2"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Mindestens ein Merkmal",
"expression": "$count($children[status = 'true']) >= 1"
}
}
]
},
"2": {
"id": "1a5b7c3d-2e4f-4a6b-8c9d-0e1f2a3b4c5d",
"label": "Merkmal 1"
}
}
}
}

delegated--rejects-custom-combiner-on-logical-parent

DescriptionA combiner sits on a node if and only if its operator is `DELEGATED`; a declared combiner under `AND` is invalid.
Expectreject
Layersemantic
RUML3-6-operators.fixtures/reject-delegated-custom-combiner-on-logical-parent.ruml
Spec§3.6§4.1
Expected rule violationsCAP-08
At/rulemap/nodes/1
3-6-operators.fixtures/reject-delegated-custom-combiner-on-logical-parent.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "org.ruml.test/combiner",
"required": true,
"role": "combiner"
}
],
"metadata": {
"id": "5d0f7a2e-8b14-4c39-a6e1-3f9b2d7c4e80",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "0eb360a6-626a-406d-89a1-9f434ced141b",
"operator": "AND",
"label": "Gesamtbewertung",
"children": ["2", "3"],
"capabilities": [
{
"id": "org.ruml.test/combiner",
"payload": {
"description": "Status des ersten Kindes",
"pickChildResult": 1
}
}
]
},
"2": {
"id": "1a5b7c3d-2e4f-4a6b-8c9d-0e1f2a3b4c5d",
"label": "Modul 1"
},
"3": {
"id": "2b6c8d4e-3f5a-4b7c-9d0e-1f2a3b4c5d6e",
"label": "Modul 2"
}
}
}
}

delegated--rejects-custom-combiner-on-leaf

DescriptionA combiner decides a node from its children, so a declared combiner on a leaf is invalid.
Expectreject
Layersemantic
RUML3-6-operators.fixtures/reject-delegated-custom-combiner-on-leaf.ruml
Spec§3.6§4.1
Expected rule violationsCAP-08
At/rulemap/nodes/1
3-6-operators.fixtures/reject-delegated-custom-combiner-on-leaf.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "org.ruml.test/combiner",
"required": true,
"role": "combiner"
}
],
"metadata": {
"id": "c7a3e9f1-2d58-4b06-9e4a-81f6b0d3a5c2",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "0eb360a6-626a-406d-89a1-9f434ced141b",
"label": "Gesamtbewertung",
"capabilities": [
{
"id": "org.ruml.test/combiner",
"payload": {
"description": "Status des ersten Kindes",
"pickChildResult": 1
}
}
]
}
}
}
}

delegated--rejects-operator-on-leaf

Description`DELEGATED` combines children, so outside a draft a node using it without a `children` array is invalid; a leaf node there has no operator at all.
Expectreject
Layerschema
RUML3-6-operators.fixtures/reject-delegated-operator-on-leaf.ruml
Spec§3.6
Expected rule violationsNODE-07OP-02
At/rulemap/nodes/1
3-6-operators.fixtures/reject-delegated-operator-on-leaf.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:expression",
"required": true
}
],
"metadata": {
"id": "ec36948d-fbb2-4815-985a-bd5e9375d934",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "0eb360a6-626a-406d-89a1-9f434ced141b",
"operator": "DELEGATED",
"label": "Blatt mit DELEGATED",
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Blätter haben keine Kinder",
"expression": "$count($children) = 0"
}
}
]
}
}
}
}

delegated--accepts-operator-on-leaf-in-draft

DescriptionIn a draft, a leaf node may have `operator: "DELEGATED"` without a combiner; the operator is ignored like any operator on a leaf.
Expectaccept
Layerschema
RUML3-6-operators.fixtures/accept-delegated-operator-on-leaf-in-draft.ruml
Spec§3.6
3-6-operators.fixtures/accept-delegated-operator-on-leaf-in-draft.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"metadata": {
"id": "9024ab81-9749-4377-91ae-8540aaf63605",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "draft"
},
"rulemap": {
"nodes": {
"1": {
"id": "213ec996-9ebc-4356-9f23-da407d5b95f3",
"operator": "AND",
"label": "Application",
"children": ["2", "3"]
},
"2": {
"id": "58af0112-6b5b-4881-8604-b11c996ba410",
"operator": "DELEGATED",
"label": "Applicant is of age"
},
"3": {
"id": "91aceddf-ad2e-48dd-8555-47893543321a",
"label": "Signature is present"
}
}
}
}

delegated--rejects-missing-description

Description`description` is required on a combiner: the operator name no longer says what the node does.
Expectreject
Layerschema
RUML3-6-operators.fixtures/reject-delegated-combiner-without-description.ruml
Spec§3.6§4.14
Expected rule violationsOP-04
At/rulemap/nodes/1/capabilities/0/payload
3-6-operators.fixtures/reject-delegated-combiner-without-description.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:expression",
"required": true
}
],
"metadata": {
"id": "ec36948d-fbb2-4815-985a-bd5e9375d934",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "0eb360a6-626a-406d-89a1-9f434ced141b",
"operator": "DELEGATED",
"label": "Ausdruck ohne Prosa",
"children": ["2"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"expression": "$count($children[status = 'true']) >= 1"
}
}
]
},
"2": {
"id": "1a5b7c3d-2e4f-4a6b-8c9d-0e1f2a3b4c5d",
"label": "Merkmal 1"
}
}
}
}

delegated--rejects-expression-not-required

Description`ruml:expression` declared with `required: false` would let a tool that cannot combine the children evaluate the file anyway.
Expectreject
Layerschema
RUML3-6-operators.fixtures/reject-delegated-expression-not-required.ruml
Spec§4.14
Expected rule violationsCAP-11
At/capabilities/0/required
3-6-operators.fixtures/reject-delegated-expression-not-required.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:expression",
"required": false
}
],
"metadata": {
"id": "1f25153c-4a79-43a9-a7df-79d764c86489",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "9a24fd46-7917-4d1d-ab6e-b0bd796f5037",
"operator": "DELEGATED",
"label": "Mindestens zwei Merkmale erfüllt",
"children": ["2", "3", "4"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Mindestens zwei der drei Merkmale müssen erfüllt sein",
"expression": "$count($children[status = 'true']) >= 2"
}
}
]
},
"2": {
"id": "408bbc78-9fc3-4f0f-b844-775be4d5c736",
"label": "Merkmal 1"
},
"3": {
"id": "3b81ab9a-3604-4d5d-a3de-045b28b10e6e",
"label": "Merkmal 2"
},
"4": {
"id": "670259e0-d0c6-4d6c-8122-6dc02b8d1bcb",
"label": "Merkmal 3"
}
}
}
}

delegated--rejects-expression-required-omitted

DescriptionA root declaration of `ruml:expression` without `required` is invalid: a tool that does not know the capability would read it as `required: false`.
Expectreject
Layerschema
RUML3-6-operators.fixtures/reject-delegated-expression-required-omitted.ruml
Spec§4.14
Expected rule violationsCAP-11
At/capabilities/0
3-6-operators.fixtures/reject-delegated-expression-required-omitted.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:expression"
}
],
"metadata": {
"id": "463ddf17-49f7-4081-8411-86e791ac2da3",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "568f8ca7-d991-4489-bf87-dad35728e342",
"operator": "DELEGATED",
"label": "Mindestens zwei Merkmale erfüllt",
"children": ["2", "3", "4"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Mindestens zwei der drei Merkmale müssen erfüllt sein",
"expression": "$count($children[status = 'true']) >= 2"
}
}
]
},
"2": {
"id": "541179cd-6ca6-4093-aa82-42ee1bcdc6f9",
"label": "Merkmal 1"
},
"3": {
"id": "58be5626-b0d6-4061-a1f8-89189f223f21",
"label": "Merkmal 2"
},
"4": {
"id": "07a85605-336b-4925-afaa-93c4b336171c",
"label": "Merkmal 3"
}
}
}
}