source node within a metanode within a loop hangs

Hello

If I place a source node (e.g. file reader) within a metanode, and then place that metanode within a loop node, it hangs on execution when the loop reaches the beginning of the 2nd iteration of the loop. The source node displays the “queued” status and just stays that way.

I observed this for the “loop x-times” and “Variables Loop (Data)” loop nodes.

Note that if the source node is in the loop directly, it does not hang - in fact, it executes only once, and it only needs to as its execution is independent of the loop variables.

It appears that KNIME treats souce nodes directly within loops differently than other nodes, in that they are only executed once and not reset when the loop advances to another iteration. However, it does not do this for source nodes that are contained within metanodes within the loop.

Dave

Hi Dave,

Thanks for reporting this. We can reproduce the problem and could also identify the problematic code block. We plan to fix this for v2.2 (not for upcoming bug fix releases given that it affects a quite central piece of code and you can easily workaround it by not using meta nodes).

Thanks again!
   Bernd

A second work around is to keep all the source nodes (e.g. File Reader) outside of the meta node and only the nodes that really are part of the flow inside the metanode.

The problem really are only nodes that are not part of the loop and lie inside a metanode within the loop.

Sorry for that. We once thought about that particular problem but failed to address it properly,
Michael

Thanks Bernd and Michael for the feedback. I have moved my source nodes out of my metanodes, and then just fed their data into the metanodes. Thanks again.
Dave

Hi,
I am also having this problem. I’m iterating over a group of files (using the Iterate List of Files node), and each file is read into a table and joined with a database table via the Joiner node. I only need to read the database table once but it needs to be joined inside the loop. Any ideas of how to work around this so that the database node can be moved outside the loop?
Thank you,
Liz

Hi Liz,

you can simply put the joiner into the file-iteration loop and connect the DB node to the other inport. The DB Reader will be executed only once. The problem above is only a problem if your DB reader is inside a metanode which is part of your loop. If that’s the case, use a metanode with an additional inport and feed the DB node in from outside this metanode.

Michael