[rules-users] Incorrect resolution of global symbols in LHS rule constraint (Java dialect)

mikerod mjr4184 at gmail.com
Thu Jan 30 16:03:21 EST 2014


Thank you for your reply.  That was helpful.  I did notice that the
workaround you proposed of 
only calling the `some.classpath.package2.MyType (
global_instance.invoke(this) )` was still not analyzing the constraint
correctly.  I think this was because #invoke() was returning an
java.lang.Object type (which would be a java.lang.Boolean at runtime).

This led us to the discovery that if we just flipped the order of the
constraint expression to:
`some.classpath.package2.MyType ( true == global_instance.invoke(this) )`
it works fine.

It looks like with beginning the expression with `true ==` instead of having
it `== true` after the method call, was able to be
analyzed correctly.

I posted a Jira for this @ https://issues.jboss.org/browse/DROOLS-420 .  I
haven't logged a Drools Jira before, so hopefully
it is filled out as expected/desired.




--
View this message in context: http://drools.46999.n3.nabble.com/Incorrect-resolution-of-global-symbols-in-LHS-rule-constraint-Java-dialect-tp4027921p4027935.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list