Hi there,
I simply can’t get my head around it: I have a classic if then condition.
Roll a dice
–> if number is even (2,4,6), execute upper part of the workflow
–> if number is odd (1,3,5) execute lower part of the workflow.
Wanted to do it with the rule engine but that has only one out port.
IF Switch seemed to be correct but doesn’t allow for checking any conditions.
What am I doing wrong?
ipazin
November 13, 2020, 1:02pm
2
Hello @kowisoft ,
roll a dice; if 2,4,6 create “top” and if 1,3,5 create “bottom” flow variable to control IF Switch node.
Check this example where @mlauber71 used Java Snippet to create top/bottom flow variable. Rule Engine + Table Row to Variable works as well.
Br,
Ivan
3 Likes
Thank you for the response @ipazin
As I tend to shy away from “coding”
Hence I found another solution using the “Case Switch” node (for anyone who is as scared as I am from coding)
I created a column which holds the term “activebranch” as content in a Table Creator node and then use that column in the rowID node as the new rowID which then is used in the Table Column to Variable node, see screenshot below:
3 Likes
can you share a sample of your workflow with sample data? would like to understand it better
Hi Daniel,
sure, see here:
The workflow has three branches, depending if the dice rolled 1 or 2, 3 or 4, 5 or 6.
And I have learned to use the KNIME hub along the way
2 Likes
system
Closed
May 18, 2021, 7:27am
7
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.