test_threecolumnswithconstraints.drl

来自「jboss规则引擎」· DRL 代码 · 共 24 行

DRL
24
字号
package org.drools.compiler;

import org.drools.Cheese;
import org.drools.Person;

rule "three columns with constraints 1"
  when  		  	
    $cheese1 : Cheese( $type : type == "cheddar", $price1 : price )
    $cheese2 : Cheese( type == $type, $price2 : price -> ( $price1.intValue() == $price2.intValue() ) )    
    Person( name == $type )
  then
	System.out.println( "done 1" );
end


rule "three columns with constraints 2"
  when  		  	
    $cheese1 : Cheese( $type : type == "cheddar", $price1 : price )
    $cheese2 : Cheese( type == $type, $price2 : price -> ( $price1.intValue() == $price2.intValue() ) )   
  then
	System.out.println( "done 2" );

end

⌨️ 快捷键说明

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