I'm not 100% sure, but you might need to use the MVEL dialect to access maps in this way.

On 4 April 2011 21:51, AberAber <maryellenbench@hotmail.com> wrote:
Using Drools 5.1.1

Is there anything I can do except to make a method/property in my original
class to do the .get into map for me?  According to drools specs this should
work.

This gets the error:

rule "Find Lowest Score"
salience 100
when
       $aobject : DataObject($index: extracted.indexString)
       $node : Information($classScore : adjustedScores[$index])
then
       System.out.println(" Class score " + $classScore);
end

Description     Resource        Path    Location        Type
BuildError: Unable to create Field Extractor for 'adjustedScores[$index]'
droolsLocal.drl /src/main/resources     line 30 Drools Error


This works:
rule "Find Lowest Score"
salience 100
when
       $aobject : DataObject($index: extracted.indexString)
       $node : Information($classScore : adjustedScores["ASTRING"])
then
       System.out.println(" Class score " + $classScore);
end




--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Map-Accessor-not-allowing-using-a-parameter-gets-field-extractor-error-tp2776894p2776894.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users