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

Davide Sottara dsotty at gmail.com
Thu Jan 30 16:09:17 EST 2014


Thanks,
today we have actually identified the real cause of the error
and we are already working to get it fixed.
I wonder if a cast would also work :
MyType( (Boolean) global_invoke( this ) )
Davide

On 01/30/2014 10:03 PM, mikerod wrote:
> 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.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



More information about the rules-users mailing list