I need to call a java function in the LHS (When part of the DRL) like so:

When

eval(DataComparator.compare("key1", "key2"))

where key1 and key2 are keys into a Map encapsulated by DataComparator
class.  How do I pass the Map to the DataComparator class in the first
place.  Do I have to do like so:

eval(DataComparator.init(Map<String, String> map)
eval(DataComparator.compare("key1", "key2")

This all seems like a bad hack to me.

What are the standard best practice to achieve what I need?

Also eval are slow why?  is eval the only way to call a function in the When
part?

thx!



--
View this message in context: 
http://drools.46999.n3.nabble.com/calling-a-function-in-When-of-DRL-tp4027641.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to