Hi @Julie_sha ,
Welcome to the KNIME community. As a real beginner in KNIME, I don’t envy you trying to cut your teeth not just on loops, but recursive loops. They are possibly the most complex loop structure that KNIME has, and there are many experienced KNIMERS who stay away from them.
So well done for getting this far, and also thank you for posting a sample workflow, and some data. That always helps to give better assistance.
Incidentally, with the spreadsheet supplied separately, on adding this to the workflow, it causes the spreadsheet config to change, which stops it even getting to the cross-joiner.
I have re-uploaded you flow (with no other changes as far as I know), but with the spreadsheet accessed from the workflow’s data folder. This will make it easier for others to look and assist, without having to fight to get it working initially.
forum - Julie_warehouse_planning with embedded data.knwf (992.2 KB)
So that all said, I think we will need more information as it’s difficult to work out what it is you are wanting the workflow to do. I can see you are trying to process the two sheets from Excel file and join them together in some way, but what is the overall purpose, and maybe if you can give a summary of the steps you are trying to achieve, we can help in pointing you at a solution.
As you say, the flow doesn’t work and the reason for that is that the two loops are partially coinciding whereas KNIME is going to need one loop to be fully inside the other, or separate from it.
In terms of the current workflow, here are the specific problems that I can see without further investigation. They are mistakes easily made when first starting out, so don’t treat this as a criticism, but I am trying to indicate why what you have cannot currently work.
(1) The two Loop Start nodes are appearing to merge together here. One loop needs to be inside the other, or both be separate. When you consider that you have two “cycles”, how are these cycles supposed to be related to each other when one is not inside the other? This is where we need to know what you are wanting it to do.
(2) The Loop End node. As far as KNIME is concerned, this just ends a loop but it doesn’t know which one, and even if we can say from the name (i.e one loop is recursive but the other isn’t) without one loop being wholly contained inside the other, who many iterations of one loop are you expecting to occur, for each iteration of the other?
(3) The branch exits one of the loops and bypasses the first Loop End. What are you expecting it to do at this point, as data here is involved in an iteration, so it cannot just do its own thing.
(4) What data are you actually wanting to use for the next iteration? This is where the data that has branched out from the inner loop has appeared, so what is this data?
The cross-joiner “flow variable” stack message has come about because of point (1) above, in that two loops appear to be merging which isn’t allowed.
So if you can give an overall summary of what task you are trying to achieve (i.e. we have the input data, but what is the form of the intended output?) somebody will be able to help. Just a small example of partial output should be enough.