{"title":"Rule Engine Variable (Dictionary)","nodeType":"Manipulator","id":"*29nSd_u9UJfekyPb","factoryName":"org.knime.base.node.rules.engine.twoports.RuleEngineVariable2PortsNodeFactory","factoryId":"org.knime.base.node.rules.engine.twoports.RuleEngineVariable2PortsNodeFactory","path":["Workflow Control","Variables"],"owner":"knime","ownerAccountId":"account:team:b5f0848f-496d-4e6a-b869-fa3532248db7","description":"<p>This node takes a list of user-defined rules and tries to match them to the defined flow variables. If a rule matches, its outcome value will become the value of the flow variable. The first matching rule will determine the outcome.</p><p>Each rule is represented by a row. To add comments, start a line in a (condition) cell with <tt>//</tt> (comments can not be placed in the same line as a rule). Anything after <tt>//</tt> will not be interpreted as a rule. Rules consist of a condition part (antecedent), which must evaluate to <i>true</i> or <i>false</i> , and an outcome (consequent, after the &#61;&gt; symbol) which is put into the new flow variable if the rule matches.</p>\n                        \n            <p>The outcome of a rule can either be a constant string, a constant number or boolean constant, or a reference to a flow variable value. The type of the outcome column is the common super type of all possible outcomes (including the rules that can never match). If no rule matches, the outcome is &#34;&#34;, 0, or 0.0 depending on the output type.</p>\n                        \n            <p>Numbers are given in the usual decimal representation. Note that strings must not contain (double-)quotes (for those cases use the following syntax: <tt>/Oscar Wilde&#39;s wisdom: &#34;Experience is simply the name we give our mistakes.&#34;/</tt> ). The flow variables are represented by <b>$${<!-- --></b> TypeCharacterAndFlowVarName <b>}$$</b> . The TypeCharacter should be &#39;D&#39; for double (real) values, &#39;I&#39; for integer values and &#39;S&#39; for strings.</p>\n                        \n            <p>The logical expressions can be grouped with parentheses. The precedence rules for them are the following: <tt>NOT</tt> binds most, <tt>AND</tt> , <tt>XOR</tt> and finally <tt>OR</tt> the least. Comparison operators always take precedence over logical connectives. All operators (and their names) are case-sensitive.</p>\n                        \n            <p>Some example rules (each should be in one row):</p>\n                        \n            <pre>// This is a comment\n$${DFlowVar0}$$ &gt; 0 &#61;&gt; &#34;Positive&#34;\n</pre>\n                        FlowVar0 has value above zero, in which case the result flow variable has the value Positive.\n            \n            <pre>$${SFlowVar0}$$ &#61; &#34;Active&#34; AND\n    $${IFlowVar1}$$ &lt;&#61; 5 &#61;&gt; &#34;Outlier&#34;\n</pre>\n                        When FlowVar0 is &#34;Active&#34; and FlowVar1 is greater or equal to 5, then the result is Outlier.\n            \n            <pre>$${SFlowVar0}$$ LIKE &#34;Market Street*&#34; AND\n    ($${SFlowVar1}$$ IN (&#34;married&#34;, &#34;divorced&#34;)\n        OR $${IFlowVar2}$$ &gt; 40) &#61;&gt; &#34;Strange&#34;\n</pre>\n                        The logical connectives help express complex conditions.\n            \n            <pre>$${SFlowVar10}$$ MATCHES $${SFlowVar0}$$ OR $${DFlowVar2}$$ &lt; $${IFlowVar1}$$ &#61;&gt;\n    $${SFlowVar0}$$\n</pre>\n                        You can compare different flow variables.\n            \n            <p>The NaNs equal to other NaN values (other values are neither less, nor greater or equal to NaN values).</p>\n            \n        \n        ","shortDescription":"Applies user-defined (in a table) business rules to the flow variables","keywords":[],"deprecated":false,"streamable":false,"tags":["Workflow Control","Variables"],"icon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6e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LF4MJgTXAAAAAElFTkSuQmCC","views":[],"inPorts":[{"objectClass":"org.knime.core.node.port.flowvariable.FlowVariablePortObject","color":"ff4b4b","dataType":"Flow Variable","optional":true,"name":"Input variables (optional)","description":"Input variables (optional)"},{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Rules","description":"Table containing the rules"}],"outPorts":[{"objectClass":"org.knime.core.node.port.flowvariable.FlowVariablePortObject","color":"ff4b4b","dataType":"Flow Variable","optional":false,"name":"Output variables","description":"Output variable"}],"dynInPorts":[],"dynOutPorts":[],"additionalSiteInformation":{"url":"https://update.knime.com/analytics-platform/5.12","trusted":true,"enabledByDefault":true,"name":"KNIME Analytics Platform 5.12 Update Site","version":"5.12.0"},"dialog":[{"sectionName":"Options","fields":[{"name":"Dictionary mode","description":"Choose how the rules table encodes the rules.\n<ul><li><b>Rule</b> : A single column contains the full rule expression including the outcome (e.g. &#34;$Col$ &gt; 0 &#61;&gt; TRUE&#34;).</li><li><b>Condition and value</b> : Two separate columns are used: one for the condition part of the rule and one for the outcome value.</li></ul>","optional":false},{"name":"Rule column","description":"The column in the rules table that contains the full rule expressions (condition and outcome combined, e.g. &#34;$Col$ &gt; 0 &#61;&gt; TRUE&#34;).","optional":false},{"name":"Condition column","description":"The column in the rules table that contains the condition part of each rule (e.g. &#34;$Col$ &gt; 0&#34;).","optional":false},{"name":"Value column","description":"The column in the rules table that contains the outcome value for each rule (e.g. &#34;TRUE&#34; or &#34;FALSE&#34;).","optional":false},{"name":"Treat values starting with $ as references","description":"When checked, values in the value column that start with $ will be treated as references (for example, column, flow variable, or table property references) rather than literal string values.","optional":false},{"name":"Variable name","description":"Name of the flow variable that will hold the result of the first matching rule.","optional":false}]}],"links":[{"text":"KNIME Documentation: Creation and usage of flow variables in a KNIME workflow","url":"https://docs.knime.com/ap/latest/analytics_platform_flow_control_guide/#flow-variables"}],"kudos":[],"kudosCount":0,"bundleInformation":{"bundleVersion":"5.12.0.v202606171353","bundleName":"KNIME Java Snippet Nodes","bundleSymbolicName":"org.knime.jsnippets","bundleVendor":"KNIME AG, Zurich, Switzerland","featureSymbolicName":"org.knime.features.javasnippet","featureName":"KNIME Javasnippet","featureVersion":"5.12.0.v202606171353","featureVendor":"KNIME AG, Zurich, Switzerland","extensionId":"*hXfYFyb7ZzM0xseG"},"frequentSuccessors":[{"id":"*_1IhL6RPLqPwFtkF","factoryName":"org.knime.base.node.rules.engine.RuleEngineVariableNodeFactory","probability":0.14285714285714285},{"id":"*CLf1dnRUyl2myKc_","factoryName":"org.knime.base.node.flowvariable.appendvariabletotable2.AppendVariableToTable2NodeFactory","probability":0.14285714285714285},{"id":"*czF_b1jv4IgZUqyZ","factoryName":"org.knime.base.node.jsnippet.JavaEditVarNodeFactory","probability":0.14285714285714285},{"id":"*FWPUBvMqqD1vL-Pe","factoryName":"org.knime.base.node.preproc.stringmanipulation.variable.StringManipulationVariableNodeFactory","probability":0.14285714285714285},{"id":"*iwDu8kKWK5YB0F_q","factoryName":"org.knime.base.node.util.mergevariables.MergeVariablesNodeFactory","probability":0.14285714285714285},{"id":"*RhpfQro93eTBkx4z","factoryName":"org.knime.ext.sun.nodes.script.node.ifswitch.JavaIfSwitchNodeFactory","probability":0.14285714285714285},{"id":"*T2WZJU7jOfyFDtl6","factoryName":"org.knime.base.node.mine.decisiontree2.learner2.DecisionTreeLearnerNodeFactory3","probability":0.14285714285714285}]}
