i have build a workflow that should read verb forms from a web page and write them down to a text file that can be read by my flash card vocabulary app:
read spanish verbs from a static table and submit them to a website one by one (per iteration)
the website will then show a page with multiple tables (numbered in the html-code), each table representing a different verb tense (present, future, past, conditional etc.) of that verb.
the second nested loop will read numbers of the required tables from a static table and extract the related table from the page. In each iteration of this loop, the information extracted is written into a text file (create/append) for that specific tense.
once all tables/verb tenses are written for a verb, go back to â back to 1), the next verb from the list is fed to the page âŚ
the result is one text file for each tense, containing all conjugations (rows from each web table) concatenated in one row per verb, like this:
the whole process already worked once for the first iteration (5 files - 1 for each tense - correctly written by the csv-writer), before adding the loop ends. Then I wanted to close the loops and the problem started:
I understand that something is misconfigured with the variable loop ends (each loop end refers to the respective variable), but I donât know what.
I got the âCanât merge flow variable stacksâ message thrown by the table extractor node, but
I cannot reset that node and I cannot configure it: the variable âhtml_pathâ created in node 11 (that points to the table to be extracted) will not show up for selection in the flow variable section of the table extractor.
I tried to reset all nodes, reload the whole thing, even throwing away the table extractor and configuring a new one did not help. Any suggestions? Thanks!
@roberting from the screenshot it does look like the start of both the loops is on the same level so it would not know which on is the outer and which one the inner loop You will have to correct the wiring.
Sometimes it does help to put the contents of a loop inside a Metanode or Component so that it will be obvious which operations would belong to which loop.
Hi @roberting , I agree with @mlauber71 . Though you said you have a nested loop, itâs not clear which loop is inside which loop. They look like theyâre on the same level as @mlauber71 pointed out.
Thanks for pointing his out; the automatic layout placed the starting points visually on the same âlevelâ (leftmost).
However, my understanding was, that the âdata pathâ is somehow the principal path, while the âvariable path(s)â are of a âlowerâ priority.
Thus I assumed the data path would first start the verb loop start (called from node 37, the clear node) and later, once arrived at the table extractor node, call the âside branchâ (the âvariable pathâ with the verbtenses loop start).
As i understand now, that is obviously not the case.
But it leaves me puzzled as how to set this up at all, that is, how to define the âmain execution chainâ that determines the execution order ?!
You will have to tell them what the order is by connecting the nodes typically with flow variables. What will happen is that you have a cross-country join of your variables/paths and you will have to make a decision what should happen (BTW that would be the case in any programming language or system).
Might I suggest you check out the KNIME guide about loops and so on: