Hi All,
For the below use case i have implemented the rule. Please suggest other way
of doing without salience.
scenario
ITEMS AMOUNT OCCNO
PASS 10 1
FAIL 10 2
PASS 15 3
PASS 25 4
rule "HelloWorld_14"
salience (65522- $list.indexOf( $transdet1 ))
when
$p1:Passes($list : transaction)
$trans1:Transaction(items in ("PASS")) from $list
$p2:Passes()
not(exists($transdet5:Transaction(items in
("FAIL"),value==$transdet1.getVaue(), occno>$trans1.getOccno()) from
$p2.transaction))
then
System.out.println($trans1.getOccno());
end
The above will return
3
4 (not 4,3)
Kindly suggest other way of doing this without salience.
Thanks
Salt
--
View this message in context:
http://drools.46999.n3.nabble.com/Without-salience-tp4019565.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.