- Workaround Description: The types of the query arguments has to be coherent with the declarations so either rewrite the query signature like: query isTriple( int $a, int $b, int $c ) or change the patterns in the query itself like: Integer( this == $a ) - Steps to Reproduce: Compile and start session from KB. rule "kickoff" salience 100 when then for( Integer i: new Integer[] {3,4,5,12,13 } ) { insert( i ); } end rule "find triple forward" when Integer( $a: intValue ) Integer( $b: intValue > $a ) Integer( $c: intValue > $b ) eval( $a*$a + $b*$b == $c*$c ) then System.out.println( "fwd: " + $a + " " + $b + " " + $c ); end query isTriple( Integer $a, Integer $b, Integer $c ) Integer( intValue == $a ) Integer( intValue == $b && > $a ) Integer( intValue == $c && > $b ) eval( $a*$a + $b*$b == $c*$c ) end rule "find triple backward" when isTriple( $a, $b, $c; ) then System.out.println( "bwd: " + $a + " " + $b + " " + $c ); end
Fixed by https://github.com/droolsjbpm/drools/commit/51b3d7794fd1f50bea2a6888db6aeafefdc8da74
Verified on BRMS 6.0.0 ER5.