How does one send parameter from one workflow ‘calling’ to another ‘called’?
The calling workflow has a table as follows
I need to execute the called workflow and process each of these records. In this case it simply creates files A001.csv, A002.csv etc.
To do this, I thought I should generate some kind of loop in my calling workflow that will execute the called workflow for each record. In this example, it will be 3 times
Attached workflow is a sample only.
It sets the framework for the next step. Two issues with this are
- It executes only once for now. (that’s for obvious reasons, there is no loop)
- It sends the whole table instead of just one record. (because the whole table goes as a parameter)
In my earlier attempts, I tried Group Loop Start, Loop End, Generic loop, Recursive loop.
My concepts of the use of these nodes are still not clear.
007_Calling_Workflow.knwf (11.0 KB) 007_Called_Workflow.knwf (11.2 KB)
if I got you right you need Table Row To Variable Loop Start node. It will run one iteration for each row. In called workflow Container Input (Variable) can be used to transfer flow variables produced by loop start node. Note: Input data port of Call Workflow (Table Based) is optional in case data doesn’t need to be transferred.
Your suggestion @ipazin was to use the table row to variable loop start.
The looping aspect worked fine.
The sending or receiving of the key parameter is the issue.
I spent last 5 hours trying to crack this.
Any further suggestions welcome.
(15.3 KB) 007_Called_Workflow.knwf
Maybe you take a look at this example. Information is passed on to the sub workflow by json container.
Thankyou @mlauber71, Thank you @ipazin
I used a combination of your suggestions and its working. The principle is anyway. I now have to implement it in my real workflow. I don’t see many issues.
The bit that the sample workflow is missing is the Container Input (JSON) specifications.
The example needs to have the below bit I think. Once I introduced it, it worked!
There were some examples on Knime Hub that gave me some idea. .
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.