I would like to create some persistent global context data and fetch the values via a JSONata expression.
[
{
"id": "64036d4f75497fb8",
"type": "inject",
"z": "33667947.7eff86",
"name": "timestamp",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 120,
"y": 1780,
"wires": [
[
"2dccac77b6123021"
]
]
},
{
"id": "f991e0b7c84f3a55",
"type": "change",
"z": "33667947.7eff86",
"name": "",
"rules": [
{
"t": "set",
"p": "av_test",
"pt": "global",
"to": "{}",
"tot": "json"
},
{
"t": "set",
"p": "av_test.rain",
"pt": "global",
"to": "10.0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 330,
"y": 1780,
"wires": [
[]
]
},
{
"id": "2dccac77b6123021",
"type": "change",
"z": "33667947.7eff86",
"name": "tel_message_gw",
"rules": [
{
"t": "delete",
"p": "payload",
"pt": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{}",
"tot": "json"
},
{
"t": "set",
"p": "payload.content",
"pt": "msg",
"to": "\"TEST: \\n\" &\t\"Testwert: \" & $globalContext('test.rain') & \"mm\" & \"\\n\" &\t\"Schwellwert: \" & $globalContext('payload.rain') & \"mm\"",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 590,
"y": 1780,
"wires": [
[
"025cf57658c78c16"
]
]
}
]
The global context data neither shows up in the context data view nor in the message (via debug-node). Could please someone give me a help!