Icon

7. Loop on Condition

Loop on Condition
Workflow: Loop on Condition This workflow implements a loop cycle on condition, that is a loop that stops when a given condition is met.It is a game. I think of a number and write it into the Table Creator node. Then I start the loop with a Generic LoopStart node.In the loop I prompt the user to guess the number I thought. He should write his guess into the String Input Widgetnode. If the answer is not right, the user is prompted again till the answer is right OR he has already tried 3 times.The condition is built by the Rule Engine Variable node into the flow variable "success" and verified by the VariableCondition loop End node. If the condition has been met, the loop stops.This workflow should run on a KNIME WebPortal, since there the Quickform node makes the workdlow stop to repeat till guessedor attempts > 3collect list of guessesrepeat till guessedor attempts > 3Solutionguess andcorrect answer match?> 3 iterations?try to guessappend guess to correct answerto displaycorrectanswer Variable ConditionLoop End Generic Loop Start Table Creator Rule EngineVariable String Widget Variable to TableColumn (deprecated) Table Rowto Variable Workflow: Loop on Condition This workflow implements a loop cycle on condition, that is a loop that stops when a given condition is met.It is a game. I think of a number and write it into the Table Creator node. Then I start the loop with a Generic LoopStart node.In the loop I prompt the user to guess the number I thought. He should write his guess into the String Input Widgetnode. If the answer is not right, the user is prompted again till the answer is right OR he has already tried 3 times.The condition is built by the Rule Engine Variable node into the flow variable "success" and verified by the VariableCondition loop End node. If the condition has been met, the loop stops.This workflow should run on a KNIME WebPortal, since there the Quickform node makes the workdlow stop to repeat till guessedor attempts > 3collect list of guessesrepeat till guessedor attempts > 3Solutionguess andcorrect answer match?> 3 iterations?try to guessappend guess to correct answerto displaycorrectanswer Variable ConditionLoop End Generic Loop Start Table Creator Rule EngineVariable String Widget Variable to TableColumn (deprecated) Table Rowto Variable

Nodes

Extensions

Links