Combine and Status node question?

Given the following flow?

[{"id":"11cd268d.ac2249","type":"inject","z":"d9c9f5b0.34c538","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":310,"y":800,"wires":[["6edd5384.d65dbc"]]},{"id":"17923dbb.3f3b32","type":"inject","z":"d9c9f5b0.34c538","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":310,"y":840,"wires":[["2e7f5f9.18de0a"]]},{"id":"9917baac.4adb48","type":"inject","z":"d9c9f5b0.34c538","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":310,"y":880,"wires":[["51aa90d5.5ea7d"]]},{"id":"215b3560.9c8f1a","type":"inject","z":"d9c9f5b0.34c538","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":310,"y":920,"wires":[["836d0830.675648"]]},{"id":"b559971b.940958","type":"complete","z":"d9c9f5b0.34c538","name":"","scope":["836d0830.675648","51aa90d5.5ea7d","2e7f5f9.18de0a","6edd5384.d65dbc"],"uncaught":false,"x":290,"y":1000,"wires":[["700a56c.fa20ca8"]]},{"id":"6edd5384.d65dbc","type":"delay","z":"d9c9f5b0.34c538","name":"1s","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470,"y":800,"wires":[[]]},{"id":"2e7f5f9.18de0a","type":"delay","z":"d9c9f5b0.34c538","name":"2s","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470,"y":840,"wires":[[]]},{"id":"51aa90d5.5ea7d","type":"delay","z":"d9c9f5b0.34c538","name":"3s","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470,"y":880,"wires":[[]]},{"id":"836d0830.675648","type":"delay","z":"d9c9f5b0.34c538","name":"4s","pauseType":"delay","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470,"y":920,"wires":[[]]},{"id":"700a56c.fa20ca8","type":"debug","z":"d9c9f5b0.34c538","name":"Message","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":460,"y":980,"wires":[]},{"id":"2694e9e9.a784a6","type":"status","z":"d9c9f5b0.34c538","name":"","scope":["6edd5384.d65dbc","2e7f5f9.18de0a","51aa90d5.5ea7d","836d0830.675648"],"x":300,"y":960,"wires":[["700a56c.fa20ca8"]]}]

Why do I get 7 debug messages? I would expect 1 per invoke node, and 1 per invoke from status node, that would be 8?

Also, if I wanted the combine node to only return that last result of the invoke nodes, how does one do that? A join node? Suggested configuration of the join node?

My take on it:

The complete node is a waste of time. Nothing comes out of it.

Why 7 and not 8?

That is a mystery that I can't answer with clarity, but I can tell you this:

The 2, 3 and 4 second nodes send TWO messages. (2 * 3 = 6)
The 1 second node only sends ONE message. (+1 = 7)

If you make it 1.1 seconds you get TWO outputs.

Why? Beats me, but there is this bug with 1 second and the delay node.

Yeah, I just seem to find odd stuff all the time... my career in IT, many times I did this.

I also realized the completion node is part of the problem, the following flow works for what I need, just not what I expected.

[{"id":"215b3560.9c8f1a","type":"inject","z":"d9c9f5b0.34c538","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":310,"y":860,"wires":[["836d0830.675648","51aa90d5.5ea7d","2e7f5f9.18de0a","6edd5384.d65dbc"]]},{"id":"6edd5384.d65dbc","type":"delay","z":"d9c9f5b0.34c538","name":"1s","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470,"y":800,"wires":[["4fb39de7.6868e4"]]},{"id":"2e7f5f9.18de0a","type":"delay","z":"d9c9f5b0.34c538","name":"2s","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470,"y":840,"wires":[["4fb39de7.6868e4"]]},{"id":"51aa90d5.5ea7d","type":"delay","z":"d9c9f5b0.34c538","name":"3s","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470,"y":880,"wires":[["4fb39de7.6868e4"]]},{"id":"836d0830.675648","type":"delay","z":"d9c9f5b0.34c538","name":"4s","pauseType":"delay","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470,"y":920,"wires":[["4fb39de7.6868e4"]]},{"id":"4fb39de7.6868e4","type":"join","z":"d9c9f5b0.34c538","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"","count":"4","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":630,"y":860,"wires":[["3cd4a255.57114e"]]},{"id":"3cd4a255.57114e","type":"debug","z":"d9c9f5b0.34c538","name":"Message","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":780,"y":860,"wires":[]}]

I know the last item in the array is always the latest given the situation.

Maybe tick my post as the solution as it was what I said that helped.

I don't care, but it may help others if/when they are searching and look at the solution.

Oh, and welcome to the world of making mistakes!

I'm pretty good at it, so don't think you are lone in that skill. :wink:

LOL! I suspect most IT professionals that are good at their chosen profession, tend to find quirks, issues, etc. in due course. Like we do!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.