In Drools, you can call any java code in the "when" block using eval(...),
however, it is not advised because it cannot be used as a node in the RETE
graph.
so,
rule "basic rule"
when
$a: Account( validAccount == true ) // condition
eval($a.isValidAccount("blah"))
then
System.out.println("Account is not valid"); // consequence
end
depends on your goal though -- if you are making a validation program, you
probably want to use rule templates. otherwise, you might as well just use
a HashMap and a 3 line java program.
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Drools-issue-tp951185...
Sent from the Drools - User mailing list archive at
Nabble.com.