⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 not_rule_test.drl

📁 jboss规则引擎
💻 DRL
字号:
package org.drools.test;

import org.drools.Cheese;

global java.util.List list;

rule "not rule test"
	salience 10
    when       
        not Cheese( price == 5 )
    then
		list.add( new Integer( 5 ) );
end    

rule "not rule with bound variable"
    when
        not Cheese( $price:price -> ( $price.intValue() == 5 ) )
    then
		list.add( new Integer( 6 ) );
end

rule "not rule with other columns 1"
    when
        Cheese( $type : type == "cheddar" )
        not Cheese( price == 5 )
    then
		list.add( new Integer( 7 ) );
end

rule "not rule with other columns 2"
    when
        not Cheese( price == 5 )
        Cheese( $type : type == "cheddar" )
    then
		list.add( new Integer( 8 ) );
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -