v1.1.2
I'm seeing some strange behaviour from the batch node.
I am trying to do a sliding window calculation on an array and getting some strange results when I change the nodes parameters.
After changing the parameters to the following the first time I trigger the flow it performs as I expect, when I trigger it the second time it wraps around the end of the array.
1st trigger of the flow:
2nd and subsequent triggers:
I would have thought that the first trigger results are correct? Definitely something wrong, or am I missing something?
Example flow:
[{"id":"287fe1a.bbf611e","type":"inject","z":"cf21b550.de9ba8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]","payloadType":"jsonata","x":110,"y":80,"wires":[["6a776a01.f070d4"]]},{"id":"6a776a01.f070d4","type":"split","z":"cf21b550.de9ba8","name":"","splt":"\\n","spltType":"str","arraySplt":"1","arraySpltType":"len","stream":false,"addname":"","x":250,"y":80,"wires":[["5ee58042.23a3d"]]},{"id":"5ee58042.23a3d","type":"batch","z":"cf21b550.de9ba8","name":"","mode":"count","count":"4","overlap":"3","interval":10,"allowEmptySequence":false,"topics":[],"x":390,"y":80,"wires":[["cb1f4b99.15e788"]]},{"id":"c629899a.af6528","type":"debug","z":"cf21b550.de9ba8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":750,"y":160,"wires":[]},{"id":"cb1f4b99.15e788","type":"join","z":"cf21b550.de9ba8","name":"","mode":"auto","build":"array","property":"payload","propertyType":"msg","key":"payload[0][0].Valid_From","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"2","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":530,"y":80,"wires":[["e68468eb.ce4768"]]},{"id":"e68468eb.ce4768","type":"join","z":"cf21b550.de9ba8","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"payload[0][0].Valid_From","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"2","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":610,"y":160,"wires":[["c629899a.af6528"]]}]