[rules-users] Exception executing consequence for rule xxx in yyy: java.lang.RuntimeException: unable to access field
magaram
magaram at deltadentalmi.com
Thu Jan 17 09:21:50 EST 2013
Laune -
I am sorry - I did not answer your earlier question. The type in this
instance was a double. But we have this exception consistently if all of
these conditions are met -
1.) In the consequence we do an assignment to a public field.
2.) There are more than one instance of the same rule firing based on
multiple tuples that match it.
The workaround seems to be to replace the field assignment with a setter
invocation on the field.
i.e.
in lieu of
when
...
then
$foo.x = $bar.y +$bar.z
...
end
do -
when
...
then
$foo.setX($bar.y +$bar.z)
...
end
However as I am testing with this workaround I am seeing other issues. I am
starting to see execution hangs in certain testcases. I have a parallel of
running these on ILOG JRules and they work - so I am certain that there are
no inadvertant infinite loop invocations between rules.
Thanks,
Muk
--
View this message in context: http://drools.46999.n3.nabble.com/Exception-executing-consequence-for-rule-xxx-in-yyy-java-lang-RuntimeException-unable-to-access-field-tp4021553p4021616.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list