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 Solutionguess andcorrect answer match?> 3 iterations?try to guesscorrectanswerappend "guess" to correct answerto displayrepeat till guessedor attempts > 3repeat till guessedor attempts > 3collect list of guesses Table Creator Rule EngineVariable String Widget Table Rowto Variable Variable toTable Column Generic Loop Start Variable ConditionLoop End 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 Solutionguess andcorrect answer match?> 3 iterations?try to guesscorrectanswerappend "guess" to correct answerto displayrepeat till guessedor attempts > 3repeat till guessedor attempts > 3collect list of guesses Table Creator Rule EngineVariable String Widget Table Rowto Variable Variable toTable Column Generic Loop Start Variable ConditionLoop End

Nodes

Extensions

Links