<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <font size="+2">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 commutative.<br>
      <br>
      Eg.,<br>
      <br>
      declare Broker<br>
      &nbsp;&nbsp;&nbsp; maxQ: Integer<br>
      <br>
      declare Order<br>
      &nbsp;&nbsp;&nbsp; q: Integer<br>
      &nbsp;&nbsp;&nbsp; b: Broker<br>
      <br>
      The rule<br>
      &nbsp;&nbsp;&nbsp; $o:Order($o.b.maxQ &lt; $o.q)<br>
      validates fine, but<br>
      &nbsp;&nbsp;&nbsp; $o:Order($o.q &gt; $o.b.maxQ)<br>
      returns an error "</font>Unable to create restriction
    '[QualifiedIndentifierRestr: &gt;
    $o.broker.maxQ ]' for field '$o.q' in the rule"<br>
    <br>
    I'm new, so I want to make sure I'm not missing something obvious
    here...<br>
  </body>
</html>