[rules-dev] Trouble using constants to access Maps
@ndré
andre at bonkowski.net
Sat Jan 30 09:23:29 EST 2010
Hi all!
I'm writing a rule that contains the following statement:
$agreementOffer:AgreementOffer($logicalFixedNumber:configurationParameters["6410"])
This results of this is not surprisingly that both $agreementOffer and
$logicalFixedNumber get assigned a value.
Instead of using the "magic value" 6410, I want to use ParameterId constant
class, which implements the toString() to return the value.
I have tried several different ways to refer to the constant but without
luck. The errors says:
Unable to create Field Extractor for
'configurationParameters[ParameterId.LOGICAL_NUMBER_FIXED]
I have also tried to extract the value of the
ParameterId.LOGICAL_NUMBER_FIXED into a local variable, which I can see
prints the correct value, but the error says the same:
Unable to create Field Extractor for
'configurationParameters[$logicalNumberFixedConstant]
Do anyone understand what is happening here and what I do wrong?
I'm are still on the JKD 1.4, and uses MVEL 1.3
Thanks,
@ndré
--
View this message in context: http://n3.nabble.com/Trouble-using-constants-to-access-Maps-tp178720p178720.html
Sent from the Drools - Dev mailing list archive at Nabble.com.
More information about the rules-dev
mailing list