First of all, some contextual info
OS: Linux RevPi34798 4.19.95-rt38-v7.
Dashboard version: v1.35.
The problem. I am designing a flow where a given message payload of the form
{
"section_1":{"CEV" : 0, "s" : 2},
"section_2":{"CEV" : 1, "s" : 3},
"section_n":{"CEV" : 0, "s" : 1}
}
(n
stands for a generic number of sections, and can be just 1) is first split with a standard (dashboard) split
node in parts whose msg.payload
have the following form:
{"CEV":0, "s":2}
These parts are then split again in messages whose payload are their simple numerical values: here it comes the problem. I want to route these values by using a switch
node according to their msg.part.key
value (respectively CEV
and s
): however, this does not work.
For example, in the 1-section model flow below
where the
inject
node sec_sts
injects the following complete message (copied from the preceding switch
node in the full flow)
{
"_msgid":"bd05ad6a.fcb66",
"payload":{"CEV":0,"s":2},
"topic":"section_1",
"_event":"node:d7590ba5.b163f8",
"parts": {
"id":"7e6805a9.7a7c4c",
"type":"object",
"key":"section_1",
"index":0,
"count":1}
}
and the split
node works perfectly giving the following two complete messages
{
"payload":0,
"topic":"section_1",
"_event":"node:d7590ba5.b163f8",
"parts":{
"parts":{
"id":"7e6805a9.7a7c4c",
"type":"object",
"key":"section_1",
"index":0,
"count":1
},
"id":"6cb0f9b3.45c048",
"type":"object",
"key":"CEV",
"index":0,
"count":2
},
"_msgid":"8dd99f88.82b48"
}
and
{
"payload":2,
"topic":"section_1",
"_event":"node:d7590ba5.b163f8",
"parts":{
"parts":{
"id":"7e6805a9.7a7c4c",
"type":"object",
"key":"section_1",
"index":0,"count":1
},
"id":"6cb0f9b3.45c048",
"type":"object",
"key":"s",
"index":1,
"count":2
},
"_msgid":"3e32f1bf.799b2e"
}
I am not able to make the sts_router
split
node work correctly, i.e. to make it work according to the values of the msg.parts.key
property. Setting of the sts_router
node is
I'm almost sure that I am missing something trivial, but I am not able to see it, so I've decided to ask for your precious help. Thanks in advance.