Direct product with loops

I tried to create a direct product of two columns using the Row to Variable Loop Start, Variable to TableRow, Joiner and Loop End nodes.
When I tried it reports this error: Encountered loop-end without corresponding head!.
Is this intentional, or it will change in the future and the following will be possible:

source1 -> Row to Variable Loop Start -> Variable to TableRow --\                                                                  Joiner -> Loop End source2 -> Row to Variable Loop Start -> Variable to TableRow --/ ? Shall I need two Loop End nodes? Thanks, gabor

Hi,

Sorry for spamming your post here. It seems the new forum software doesn’t have the option to communicate directly between members or at least I can’t find it.

I replied on here http://www.knime.org/node/447 I am very interested in this functionality and would be happy to contribute.

All the best,

Jay

Yes, you need two Loop End nodes to close the first and the second Loop Start node. Both have to be put in the pipeline before the Joiner node. That’s all. Best, Thomas

…and there is a reason for this, too - what functionality would you expect from
a loop with one end and two starts? Since, in effect, this is modelling a until-while
construct (both, start and end node can determine when to stop executing the loop),
one start node could stop while the other wants to continue. Think about it like


  while (foo()) and while (foo2())
  do
    ...
  od

So, if you want to have two pipeline branches executed in one branch, they need
to be connected to one single start and one single stop node.

However, the looping behaviour will be improved in the next release, especially
considering the error messages…

Michael

@gabriel: But in that case you will be not be able to join them meaningfully, those will have more than one rows (the same as source, but with an Iteration column). So for me it is not on option.

@berthold: I understand your reasoning, but because as it does not work with two nodes (it needs to run the first one, but that is impossible), so in my opinion it is not doable with these nodes. (Although I can imagine embedded loops… (Just an idea, do not know how would I design or implement it.) Maybe something like a joiner on loop variables?)

@Jay: I have seen your reply, this question is related to an attempt to design this as a metanode. I will reply there soon.