Correct: I haven't posted a full working flow.
I posted the part that does that which I am asking.
Here is a slightly bigger part which has all the nodes needed to see it.
There are GUI nodes, so be prepared for them.
[{"id":"e6d3baca.8b0b38","type":"ui_text","z":"f9420cde.5b8bb8","group":"e48399e0.8415c","order":3,"width":"10","height":"4","name":"Flow error","label":"","format":"{{msg.payload}}","layout":"row-spread","x":1604,"y":1690,"wires":[]},{"id":"6c96a140.9725d8","type":"switch","z":"f9420cde.5b8bb8","name":"Last","property":"_queueCount","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":1210,"y":1690,"wires":[["e6d3baca.8b0b38"],["160988d8.e2947f"]]},{"id":"160988d8.e2947f","type":"template","z":"f9420cde.5b8bb8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload}} (Last)","output":"str","x":1220,"y":1730,"wires":[["e6d3baca.8b0b38"]]},{"id":"e72b1b4b.639ec8","type":"inject","z":"f9420cde.5b8bb8","name":"Next","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"CONTROL","payload":"trigger","payloadType":"str","x":1080,"y":1610,"wires":[["9dde0c69.114468"]],"icon":"node-red/trigger.svg"},{"id":"bdb9721b.575c4","type":"inject","z":"f9420cde.5b8bb8","name":"Wipe","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":" ","payloadType":"str","x":1080,"y":1650,"wires":[["3148dfa8.a094e"]],"icon":"font-awesome/fa-eject"},{"id":"3c80536c.fdeb74","type":"q-gate","z":"f9420cde.5b8bb8","name":"","controlTopic":"CONTROL","defaultState":"queueing","openCmd":"Go","closeCmd":"Stop","toggleCmd":"toggle","queueCmd":"queue","defaultCmd":"default","triggerCmd":"trigger","flushCmd":"flush","resetCmd":"reset","peekCmd":"","dropCmd":"","statusCmd":"","maxQueueLength":"50","keepNewest":true,"qToggle":false,"persist":false,"x":1080,"y":1690,"wires":[["6c96a140.9725d8"]]},{"id":"9dde0c69.114468","type":"ui_button","z":"f9420cde.5b8bb8","name":"Next ","group":"e48399e0.8415c","order":4,"width":"2","height":"1","passthru":true,"label":"Next","tooltip":"","color":"","bgcolor":"lime","icon":"","payload":"trigger","payloadType":"str","topic":"CONTROL","topicType":"str","x":1210,"y":1610,"wires":[["3c80536c.fdeb74"]]},{"id":"3148dfa8.a094e","type":"ui_button","z":"f9420cde.5b8bb8","name":"","group":"e48399e0.8415c","order":5,"width":"2","height":"1","passthru":true,"label":"Wipe","tooltip":"","color":"","bgcolor":"red","icon":"","payload":" ","payloadType":"str","topic":"","topicType":"str","x":1210,"y":1650,"wires":[["e6d3baca.8b0b38"]]},{"id":"e48399e0.8415c","type":"ui_group","name":"Flow error display","tab":"48f5e285.67a4c4","order":1,"disp":true,"width":"11","collapse":false},{"id":"48f5e285.67a4c4","type":"ui_tab","name":"ALARMS","icon":"mi-notification_important","order":5,"disabled":false,"hidden":false}]
Just send any message into the q-gate
then press the Next
button/node.
There is still a lot of code which I haven't posted. It isn't important to get the result.
But here is a full go to woe of things happening.
All things are good:
An error is detected. I see who has it and am prompted to look at it.
I press the NEXT
button and see this.
As there is only 1
error, you can clearly see the (Last)
message appended to the message.