Try parenthesizing the right hand side but note that you may have to use getters to access the fields<br> $o:Order($o.q > ($o.getB().getMaxQ() ) )<br><br>It's possible that using dialect "mvel" might be a way to avoid using the getX() instead of x.<br>
<br>-W<br><br><br><div class="gmail_quote">On 31 December 2010 17:30, Michael Whidden <span dir="ltr"><<a href="mailto:mwhidden@thebluew.com">mwhidden@thebluew.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
At Mr. Legendre's suggestion, I removed the $o from my constraints, but<br>
with the same result: (b.maxQ < q) works, but (q > b.maxQ) fails. I get<br>
the error:<br>
"Unable to create restriction '[QualifiedIndentifierRestr: < b.maxQ ]'<br>
for field 'quantity' in the rule 'MaxQty'"<br>
<br>
<br>
<br>
On 12/30/2010 2:32 PM, Michael Whidden wrote:<br>
> I notice an unexpected behavior when creating a technical DRL in Guvnor.<br>
><br>
> If I have a fact with a sub-fact, then binary operators don't seem to be<br>
> commutative.<br>
><br>
> Eg.,<br>
><br>
> declare Broker<br>
> maxQ: Integer<br>
><br>
> declare Order<br>
> q: Integer<br>
> b: Broker<br>
><br>
> The rule<br>
> $o:Order($o.b.maxQ < $o.q)<br>
> validates fine, but<br>
> $o:Order($o.q > $o.b.maxQ)<br>
> returns an error "Unable to create restriction<br>
> '[QualifiedIndentifierRestr: > $o.broker.maxQ ]' for field '$o.q' in the<br>
> rule"<br>
><br>
> I'm new, so I want to make sure I'm not missing something obvious here...<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>