Or without either Javascript or Jsonata (but using a flow context variable), something like this
[{"id":"ced017293aa1331f","type":"inject","z":"44697d3f1dd2e45f","name":"Every minute","props":[{"p":"payload"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":80,"wires":[["6af37f61fc1aa754"]]},{"id":"283fc13806e225fd","type":"inject","z":"44697d3f1dd2e45f","name":"Barcode Heartbeat","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":180,"wires":[["7e03079522c0bc48"]]},{"id":"7e03079522c0bc48","type":"trigger","z":"44697d3f1dd2e45f","name":"","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"5","extend":true,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":350,"y":180,"wires":[["cb37dca247ce7a22"]]},{"id":"cb37dca247ce7a22","type":"change","z":"44697d3f1dd2e45f","name":"","rules":[{"t":"set","p":"gotBarcode","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":180,"wires":[[]]},{"id":"6af37f61fc1aa754","type":"switch","z":"44697d3f1dd2e45f","name":"","property":"gotBarcode","propertyType":"flow","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":80,"wires":[["97df320f73dea79e"],["2f7d14330b089059"]]},{"id":"97df320f73dea79e","type":"debug","z":"44697d3f1dd2e45f","name":"All good","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":480,"y":60,"wires":[]},{"id":"2f7d14330b089059","type":"debug","z":"44697d3f1dd2e45f","name":"Barcode not received","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":520,"y":100,"wires":[]}]