Hi,
I am trying to write a protoype with JBoss Rules 3.0.5
I am having problem in getting the following working properly :
rule "CompDept Product Qualification Rule"
salience 7
no-loop true;
when
$cust:( Customer( productIDs contains "Computer")
or Customer(productIDs contains "monitor"))
# Customer(compDeptState == Customer.NOTRUN) <-------- Commented line
then
$cust.setCompDeptState (Customer.DONE);
System.out.println("getStatus after...." + $cust.getCompDeptState () );
$cust.addQualifiedProduct("CompDeptProduct");
System.out.println("CompDeptProduct qualified...." );
modify($cust);
end
where productIDs are defined as Vector in Customer class.
If I run the above rule it goes in recursive mode (I have another rule in the drl that
also acts on the same customer object and modifies it).
If I uncomment the commented line my LHS it's not evaluating to true and RHS is not
running.
Any help would be appreciated.
Kind Regards,
Amarendra.
____________________________________________________________________________________
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front