[rules-users] Math calculations on attributes in WHEN section of rules.
tom ska
tiberium.linux at gmail.com
Fri Aug 6 05:48:33 EDT 2010
Hello,
what I want to do, is to calculate on object's attributes in WHEN section of
rule. Can I do it?
For example:
class CObj
{
private int k;
private int n;
// setters and getters
}
Now what I want to do is:
rule "r1"
when
p : CObj ( k + n <= 1000)
then
System.out.println("We love Drools :)");
end
Why can't I construct conditions like in Java, or C++ (with calculations in
conditions)? How can I achieve my goal?
Thx,
Tom.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100806/22a4464a/attachment.html
More information about the rules-users
mailing list