Skip to content
RUMLRUML

Open Format for Digital Law

3.6 Operators (DELEGATED evaluation)

DELEGATED aggregation with a `ruml:expression` combiner that is `true` when two or more children are `true`. Leaf statuses come from `ruml:query` over the input datapoints: `yes` is `true`, `no` is `false`, `unknown` is `undefined`.

operator-delegated--optimized--yes-yes-yes

Description3 of 3 children are `true`, so the `ruml:expression` combiner (two or more `true`) makes the DELEGATED root `true`. DELEGATED never short-circuits: all children are evaluated.
RUML3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
Spec§3.6
Runmode: optimized
Inputs
Data pointValue
dp_answer_1yes
dp_answer_2yes
dp_answer_3yes
Assertions
QueryExpected valueComment
evaluation.results.`1`.statustrue
evaluation.results.`1.1`.statustrueFirst child ('dp_answer_1')
evaluation.results.`1.2`.statustrueSecond child ('dp_answer_2')
evaluation.results.`1.3`.statustrueThird child ('dp_answer_3')
3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_answer_1": {
"name": "Answer 1",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_2": {
"name": "Answer 2",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_3": {
"name": "Answer 3",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
}
}
}
},
{
"id": "ruml:query",
"required": true
},
{
"id": "ruml:expression",
"required": true
}
],
"metadata": {
"id": "fe0a56ac-3e35-4d53-8f94-325b08295327",
"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": "70db8692-a4bf-4192-9459-c3c1c42cd815",
"operator": "DELEGATED",
"label": "root",
"children": ["2", "3", "4"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Two or more are true",
"expression": "$count($children[status = 'true']) >= 2"
}
}
]
},
"2": {
"id": "f6542f95-2fd4-49f9-8156-3b15d4dff6f9",
"label": "One",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_1)"
}
}
]
},
"3": {
"id": "7357d367-315b-4bc7-a0ba-2fbbafadd2a0",
"label": "Two",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_2)"
}
}
]
},
"4": {
"id": "bd684263-c107-47b4-bd22-dbcaaa322694",
"label": "Three",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_3)"
}
}
]
}
}
}
}

operator-delegated--optimized--no-no-no

Description0 of 3 children are `true`, so the `ruml:expression` combiner (two or more `true`) makes the DELEGATED root `false`. DELEGATED never short-circuits: all children are evaluated.
RUML3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
Spec§3.6
Runmode: optimized
Inputs
Data pointValue
dp_answer_1no
dp_answer_2no
dp_answer_3no
Assertions
QueryExpected valueComment
evaluation.results.`1`.statusfalse
evaluation.results.`1.1`.statusfalseFirst child ('dp_answer_1')
evaluation.results.`1.2`.statusfalseSecond child ('dp_answer_2')
evaluation.results.`1.3`.statusfalseThird child ('dp_answer_3')
3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_answer_1": {
"name": "Answer 1",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_2": {
"name": "Answer 2",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_3": {
"name": "Answer 3",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
}
}
}
},
{
"id": "ruml:query",
"required": true
},
{
"id": "ruml:expression",
"required": true
}
],
"metadata": {
"id": "fe0a56ac-3e35-4d53-8f94-325b08295327",
"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": "70db8692-a4bf-4192-9459-c3c1c42cd815",
"operator": "DELEGATED",
"label": "root",
"children": ["2", "3", "4"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Two or more are true",
"expression": "$count($children[status = 'true']) >= 2"
}
}
]
},
"2": {
"id": "f6542f95-2fd4-49f9-8156-3b15d4dff6f9",
"label": "One",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_1)"
}
}
]
},
"3": {
"id": "7357d367-315b-4bc7-a0ba-2fbbafadd2a0",
"label": "Two",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_2)"
}
}
]
},
"4": {
"id": "bd684263-c107-47b4-bd22-dbcaaa322694",
"label": "Three",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_3)"
}
}
]
}
}
}
}

operator-delegated--optimized--yes-yes-no

Description2 of 3 children are `true`, so the `ruml:expression` combiner (two or more `true`) makes the DELEGATED root `true`. DELEGATED never short-circuits: all children are evaluated.
RUML3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
Spec§3.6
Runmode: optimized
Inputs
Data pointValue
dp_answer_1yes
dp_answer_2yes
dp_answer_3no
Assertions
QueryExpected valueComment
evaluation.results.`1`.statustrue
evaluation.results.`1.1`.statustrueFirst child ('dp_answer_1')
evaluation.results.`1.2`.statustrueSecond child ('dp_answer_2')
evaluation.results.`1.3`.statusfalseThird child ('dp_answer_3')
3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_answer_1": {
"name": "Answer 1",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_2": {
"name": "Answer 2",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_3": {
"name": "Answer 3",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
}
}
}
},
{
"id": "ruml:query",
"required": true
},
{
"id": "ruml:expression",
"required": true
}
],
"metadata": {
"id": "fe0a56ac-3e35-4d53-8f94-325b08295327",
"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": "70db8692-a4bf-4192-9459-c3c1c42cd815",
"operator": "DELEGATED",
"label": "root",
"children": ["2", "3", "4"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Two or more are true",
"expression": "$count($children[status = 'true']) >= 2"
}
}
]
},
"2": {
"id": "f6542f95-2fd4-49f9-8156-3b15d4dff6f9",
"label": "One",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_1)"
}
}
]
},
"3": {
"id": "7357d367-315b-4bc7-a0ba-2fbbafadd2a0",
"label": "Two",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_2)"
}
}
]
},
"4": {
"id": "bd684263-c107-47b4-bd22-dbcaaa322694",
"label": "Three",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_3)"
}
}
]
}
}
}
}

operator-delegated--optimized--yes-no-no

Description1 of 3 children are `true`, so the `ruml:expression` combiner (two or more `true`) makes the DELEGATED root `false`. DELEGATED never short-circuits: all children are evaluated.
RUML3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
Spec§3.6
Runmode: optimized
Inputs
Data pointValue
dp_answer_1yes
dp_answer_2no
dp_answer_3no
Assertions
QueryExpected valueComment
evaluation.results.`1`.statusfalse
evaluation.results.`1.1`.statustrueFirst child ('dp_answer_1')
evaluation.results.`1.2`.statusfalseSecond child ('dp_answer_2')
evaluation.results.`1.3`.statusfalseThird child ('dp_answer_3')
3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_answer_1": {
"name": "Answer 1",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_2": {
"name": "Answer 2",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_3": {
"name": "Answer 3",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
}
}
}
},
{
"id": "ruml:query",
"required": true
},
{
"id": "ruml:expression",
"required": true
}
],
"metadata": {
"id": "fe0a56ac-3e35-4d53-8f94-325b08295327",
"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": "70db8692-a4bf-4192-9459-c3c1c42cd815",
"operator": "DELEGATED",
"label": "root",
"children": ["2", "3", "4"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Two or more are true",
"expression": "$count($children[status = 'true']) >= 2"
}
}
]
},
"2": {
"id": "f6542f95-2fd4-49f9-8156-3b15d4dff6f9",
"label": "One",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_1)"
}
}
]
},
"3": {
"id": "7357d367-315b-4bc7-a0ba-2fbbafadd2a0",
"label": "Two",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_2)"
}
}
]
},
"4": {
"id": "bd684263-c107-47b4-bd22-dbcaaa322694",
"label": "Three",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_3)"
}
}
]
}
}
}
}

operator-delegated--optimized--no-yes-yes

Description2 of 3 children are `true`, so the `ruml:expression` combiner (two or more `true`) makes the DELEGATED root `true`. DELEGATED never short-circuits: all children are evaluated.
RUML3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
Spec§3.6
Runmode: optimized
Inputs
Data pointValue
dp_answer_1no
dp_answer_2yes
dp_answer_3yes
Assertions
QueryExpected valueComment
evaluation.results.`1`.statustrue
evaluation.results.`1.1`.statusfalseFirst child ('dp_answer_1')
evaluation.results.`1.2`.statustrueSecond child ('dp_answer_2')
evaluation.results.`1.3`.statustrueThird child ('dp_answer_3')
3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_answer_1": {
"name": "Answer 1",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_2": {
"name": "Answer 2",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_3": {
"name": "Answer 3",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
}
}
}
},
{
"id": "ruml:query",
"required": true
},
{
"id": "ruml:expression",
"required": true
}
],
"metadata": {
"id": "fe0a56ac-3e35-4d53-8f94-325b08295327",
"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": "70db8692-a4bf-4192-9459-c3c1c42cd815",
"operator": "DELEGATED",
"label": "root",
"children": ["2", "3", "4"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Two or more are true",
"expression": "$count($children[status = 'true']) >= 2"
}
}
]
},
"2": {
"id": "f6542f95-2fd4-49f9-8156-3b15d4dff6f9",
"label": "One",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_1)"
}
}
]
},
"3": {
"id": "7357d367-315b-4bc7-a0ba-2fbbafadd2a0",
"label": "Two",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_2)"
}
}
]
},
"4": {
"id": "bd684263-c107-47b4-bd22-dbcaaa322694",
"label": "Three",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_3)"
}
}
]
}
}
}
}

operator-delegated--optimized--yes-yes-unknown

DescriptionA child is `undefined`, so the DELEGATED root is `undefined`, although 2 of the others are `true`; the combiner does not run. All children are evaluated.
RUML3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
Spec§3.6
Runmode: optimized
Inputs
Data pointValue
dp_answer_1yes
dp_answer_2yes
dp_answer_3unknown
Assertions
QueryExpected valueComment
evaluation.results.`1`.statusundefined
evaluation.results.`1.1`.statustrueFirst child ('dp_answer_1')
evaluation.results.`1.2`.statustrueSecond child ('dp_answer_2')
evaluation.results.`1.3`.statusundefinedThird child ('dp_answer_3')
3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_answer_1": {
"name": "Answer 1",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_2": {
"name": "Answer 2",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_3": {
"name": "Answer 3",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
}
}
}
},
{
"id": "ruml:query",
"required": true
},
{
"id": "ruml:expression",
"required": true
}
],
"metadata": {
"id": "fe0a56ac-3e35-4d53-8f94-325b08295327",
"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": "70db8692-a4bf-4192-9459-c3c1c42cd815",
"operator": "DELEGATED",
"label": "root",
"children": ["2", "3", "4"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Two or more are true",
"expression": "$count($children[status = 'true']) >= 2"
}
}
]
},
"2": {
"id": "f6542f95-2fd4-49f9-8156-3b15d4dff6f9",
"label": "One",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_1)"
}
}
]
},
"3": {
"id": "7357d367-315b-4bc7-a0ba-2fbbafadd2a0",
"label": "Two",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_2)"
}
}
]
},
"4": {
"id": "bd684263-c107-47b4-bd22-dbcaaa322694",
"label": "Three",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_3)"
}
}
]
}
}
}
}

operator-delegated--optimized--no-unknown-yes

DescriptionA child is `undefined`, so the DELEGATED root is `undefined`, although 1 of the others are `true`; the combiner does not run. All children are evaluated.
RUML3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
Spec§3.6
Runmode: optimized
Inputs
Data pointValue
dp_answer_1no
dp_answer_2unknown
dp_answer_3yes
Assertions
QueryExpected valueComment
evaluation.results.`1`.statusundefined
evaluation.results.`1.1`.statusfalseFirst child ('dp_answer_1')
evaluation.results.`1.2`.statusundefinedSecond child ('dp_answer_2')
evaluation.results.`1.3`.statustrueThird child ('dp_answer_3')
3-6-operators.fixtures/evaluation-delegated-three-queried-children.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_answer_1": {
"name": "Answer 1",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_2": {
"name": "Answer 2",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
},
"dp_answer_3": {
"name": "Answer 3",
"type": "string",
"binding": {
"type": "input"
},
"validation": {
"required": true,
"enum": ["yes", "no", "unknown"]
}
}
}
}
},
{
"id": "ruml:query",
"required": true
},
{
"id": "ruml:expression",
"required": true
}
],
"metadata": {
"id": "fe0a56ac-3e35-4d53-8f94-325b08295327",
"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": "70db8692-a4bf-4192-9459-c3c1c42cd815",
"operator": "DELEGATED",
"label": "root",
"children": ["2", "3", "4"],
"capabilities": [
{
"id": "ruml:expression",
"payload": {
"description": "Two or more are true",
"expression": "$count($children[status = 'true']) >= 2"
}
}
]
},
"2": {
"id": "f6542f95-2fd4-49f9-8156-3b15d4dff6f9",
"label": "One",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_1)"
}
}
]
},
"3": {
"id": "7357d367-315b-4bc7-a0ba-2fbbafadd2a0",
"label": "Two",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_2)"
}
}
]
},
"4": {
"id": "bd684263-c107-47b4-bd22-dbcaaa322694",
"label": "Three",
"capabilities": [
{
"id": "ruml:query",
"payload": {
"description": "'yes' is true, 'no' is false, 'unknown' yields no result and thus status undefined",
"expression": "$lookup({'yes': true, 'no': false}, dp_answer_3)"
}
}
]
}
}
}
}