Node Red cannot run nodes in parallel, only one at a time. Your inject nodes each output a message one after the other. You could combine 4 consecutive messages into an array, e.g. with a join node. Then in the next step you could compare all array values with a boolean function.
Look at this flow:
[
{
"id": "7868b47c0d956332",
"type": "tab",
"label": "Flow 14",
"disabled": false,
"info": "",
"env": []
},
{
"id": "d1b439a760ebc555",
"type": "debug",
"z": "7868b47c0d956332",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 1180,
"y": 140,
"wires": []
},
{
"id": "a5b90bfcf2c9cd92",
"type": "inject",
"z": "7868b47c0d956332",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
},
{
"p": "parts",
"v": "{\"type\":\"array\",\"count\":4,\"len\":1,\"index\":0}",
"vt": "json"
}
],
"repeat": "1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "a",
"payload": "$random()<0.5?false:true\t\t",
"payloadType": "jsonata",
"x": 330,
"y": 180,
"wires": [
[
"9ee55c0334ad28a5"
]
]
},
{
"id": "c210c384c55fd26b",
"type": "inject",
"z": "7868b47c0d956332",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
},
{
"p": "parts",
"v": "{\"type\":\"array\",\"count\":4,\"len\":1,\"index\":1}",
"vt": "json"
}
],
"repeat": "1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "b",
"payload": "$random()<0.5?false:true\t",
"payloadType": "jsonata",
"x": 330,
"y": 220,
"wires": [
[
"9ee55c0334ad28a5"
]
]
},
{
"id": "01cc1249071cf1d5",
"type": "inject",
"z": "7868b47c0d956332",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
},
{
"p": "parts",
"v": "{\"type\":\"array\",\"count\":4,\"len\":1,\"index\":2}",
"vt": "json"
}
],
"repeat": "1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "$random()<0.5?false:true",
"payloadType": "jsonata",
"x": 330,
"y": 260,
"wires": [
[
"9ee55c0334ad28a5"
]
]
},
{
"id": "4f477525ce38e77b",
"type": "inject",
"z": "7868b47c0d956332",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
},
{
"p": "parts",
"v": "{\"type\":\"array\",\"count\":4,\"len\":1,\"index\":3}",
"vt": "json"
}
],
"repeat": "1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "$random()<0.5?false:true",
"payloadType": "jsonata",
"x": 330,
"y": 300,
"wires": [
[
"9ee55c0334ad28a5"
]
]
},
{
"id": "9ee55c0334ad28a5",
"type": "function",
"z": "7868b47c0d956332",
"name": "ID Generator",
"func": "if(msg.topic !== 'generate'){\n msg.parts.id = context.get('uid');\n return msg;\n}else{\n context.set('uid', RED.util.generateId());\n}\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "// Der Code hier wird ausgeführt,\n// wenn der Node gestartet wird\n\ncontext.set('uid', RED.util.generateId());",
"finalize": "",
"libs": [],
"x": 630,
"y": 240,
"wires": [
[
"633b3963c716151f"
]
]
},
{
"id": "1e414061f410229f",
"type": "change",
"z": "7868b47c0d956332",
"name": "generate ID",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "generate",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 730,
"y": 360,
"wires": [
[
"9ee55c0334ad28a5"
]
]
},
{
"id": "633b3963c716151f",
"type": "join",
"z": "7868b47c0d956332",
"name": "",
"mode": "auto",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": "false",
"timeout": "",
"count": "",
"reduceRight": false,
"x": 890,
"y": 240,
"wires": [
[
"1e414061f410229f",
"45dee4673f86637e",
"d1b439a760ebc555"
]
]
},
{
"id": "45dee4673f86637e",
"type": "function",
"z": "7868b47c0d956332",
"name": "AND",
"func": "msg.payload = msg.payload[0] && msg.payload[1] && msg.payload[2] && msg.payload[3];\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1170,
"y": 240,
"wires": [
[
"d1b439a760ebc555"
]
]
}
]