Hi,
Yes.
1.
Define a static method in java and import the specific function in rule
file.
DroolsFunction.java
-----------------------------
public static boolean isValidForBrand() {...}
2. import the java function in rule file
invokeRule.drl
import function DroolsFunction.isValidForBrand;
when
exists (
Boolean(booleanValue==true) from
isValidForBrand($croNumberDetailsRequest.getBrand())
)
Then
ResultList.add($resdirectPhoneNumber);
Try this, It should work.
Regards,
Riyaz
On 9/11/08, Rout, Sushanta (ThoughtMill) <Sushanta.Rout(a)ihg.com> wrote:
Is there any way to call java functions in the rule? One option is *eval
*but eval is quite expensive. Hence trying to see if there is any other
option?
when
Eval($resdirectPhoneNumber.isValidForBrand($croNumberDetailsRequest.getBrand()))
Then
ResultList.add($resdirectPhoneNumber);
Thanks
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users