"!=" in the Rule Engine


How do I create a Rule with " if it's not.."? There exist something simular to "!="?



Just use "NOT (a = b)".

How to negate something like this?

NOT ($page_id$  LIKE  "*【*") ----------- Not working 

it is not working for string where  $page_id$ is a string. 

For string I am not able to use "NOT ($page_id$  = "*【*")" also...

Please help.

Krishna Shasthri M. 

My analysis on the "NOT" issue. 

The NOT operation is not working even with Integers for NOT (a = b), because after parsing "NOT" string in Rule.java, the not funtion of class RuleNodeFactory is not at all called to negate the RuleNode object. After adding the not function in Rule.java the NOT operation is working fine for both integers as well as strings.

Change in Rule.java:

      "leftNode = RuleNodeFactory.not(leftNode);" should be called after parsing NOT string. 

Please correct me if I am wrong or if I am using any wrong version. My current KNIME version is 2.3.1 and installed all add on packages and updates to software as well. 

Thanks & Regards,

Krishna Shasthri

You are right, this is a very obvious bug. It will be fixed in the next minor release. Thanks for reporting and solving it!