[rules-users] 5.2.0.M2 issue using import functions

wendy w.mungovan at yahoo.com
Tue Apr 26 09:33:43 EDT 2011


Hi,
  I've been using Drools 5.1 and I'm in the process of switching over to
5.2.0.M2.  I have a file containing many custom public static functions that
our rules use.  With 5.1 I could just "import function MyRuleFunction.*;"
and then use them in the 'when' part of the rule:

  $example: ArrayList(size>3) from collect ($p: Person( eval (
exampleImportedFunction( name, "Bob")))

but with 5.2.0.M2 I'm getting an "unable to resolve method using
strict-mode: Person.exampleImportedFunction(java.lang.String,
java.lang.String)

which makes it look like it is only searching for functions on Person but
not in the 'import functions'.

If I add "import function MyRuleFunction.exampleImportedFunction;" it works
fine but I don't want to have to do that for every function in my file. 
Functions used in the consequent don't seem to need to be imported
specifically (* works fine).  

Has something changed between 5.1 and 5.2.0.M2 that effects this?
Thank you,
Wendy 

--
View this message in context: http://drools.46999.n3.nabble.com/5-2-0-M2-issue-using-import-functions-tp2865621p2865621.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list