You could add a helper method to your java class that returns Boolean
class ChessType
public Boolean setPriceWithReturn(){
this.price = price
return true;
}
rule test123
when
cheese: Chesse()
--->>> chess.getType().setPriceWithReturn("cheap");
eval (chesse.getType () == "myType")
then
.....
end
Barry
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of
Tim.Nguyen(a)expeditors.com
Sent: Wednesday, September 12, 2007 5:11 PM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] java void in LHS
Hi all,
I would like to insert a java void to my condition(LHS). Is there anyway
to
do that? Like an example below, how can I set something to my object
before
evaluate it.
rule test123
when
cheese: Chesse()
--->>> chess.getType().setPrice("cheap");
eval (chesse.getType () == "myType")
then
.....
end
Thanks,
Tim
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users