<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
you have two patterns, there for you need two objects - it's a cross
product. Try using an eval instead of a predicate, then you can bind
all your variables on the first line, and eval them on the next line.<br>
<br>
Until you move to 4.0 there is no clean way to do this.<br>
<br>
Mark<br>
Natraj Gudla wrote:
<blockquote
 cite="mid:d55672f70707190433p4ce86159m20de8e93b511d687@mail.gmail.com"
 type="cite">
  <div>Yes, infact i expected both the conditions to work against the
same object in the working memory? Is it not possible? </div>
  <div>For this scenario, drools has not been allowing me to do a
comparison amongst two attributes of the same class. When i do so, it
complains of not being to resolve the variable.</div>
  <div>Some thing like a1 &gt; a2 does not work. I am forced to create
a declaration and then use it to compare. If i do so, the run time
thing fails.</div>
  <div>&nbsp;</div>
  <div>How do i get around to compare two attributes from the same
class. Something like</div>
  <div>&nbsp;</div>
  <div>a1 &gt; a2 or say a1 &gt; (a2 * 1.5)</div>
  <div>&nbsp;</div>
  <div>Thanks</div>
  <div>Natraj<br>
  <br>
&nbsp;</div>
  <div><span class="gmail_quote">On 7/19/07, <b
 class="gmail_sendername">Mark Proctor</b> &lt;<a moz-do-not-send="true"
 href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;
wrote:</span>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
    <div bgcolor="#ffffff" text="#000000">You do understand that what
you have there is a cross product, you'll need two objects to match
against that - were you expecting this to wokr against and on the same
single EMIAgainstProperty object?
    <br>
    <br>
Mark<br>
Natraj Gudla wrote:
    <blockquote type="cite">
      <div><span class="e" id="q_113de3b5727de46f_1">
      <div>I am facing some serious blocking issues&nbsp;while writing few
rules. In the rule below, a1, a2 are Double objects. When i have the
first statement in the rule " EMIAgainstProperty( obj : a1 )", the rule
does not fire....when i comment and re phrase the second line as emi :
EMIAgainstProperty( a2 &gt;= ( <b><font color="#960000" size="2">new</font></b><font
 size="2"> Double(10* 1.5 )) ), the rule is fired.</font></div>
      <div>&nbsp;</div>
      <div><font size="2">Why is the first line making the rule not to
fire. I have reported a similar problem yesterday, but could not find a
resolution. On the other hand, i am unable to refer a1 directly to say
a1.doubleValue () in the second line, it throws up and error. Any
help??? What is the way out? </font></div>
      <div><b><font color="#960000" size="2">
      <p align="left">rule</p>
      </font></b><font color="#008000" size="2">"Test"</font><font
 size="2"> </font><b><font color="#960000" size="2">when</font></b><font
 size="2">
      <p align="left">EMIAgainstProperty( obj : a1 )</p>
      <p align="left">emi : EMIAgainstProperty( a2 &gt;= ( </p>
      </font><b><font color="#960000" size="2">new</font></b><font
 size="2"> Double(obj.doubleValue() * 1.5 )) ) </font><b><font
 color="#960000" size="2">then</font></b>
      <font size="2">
      <p align="left">System.out.println(</p>
      </font><font color="#008000" size="2">" Passed "</font><font
 size="2">);</font><b><font color="#960000" size="2">
      <p align="left">end</p>
      </font></b></div>
      </span></div>
      <pre><hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<span class="q"><a moz-do-not-send="true"
 onclick="return top.js.OpenExtLink(window,event,this)"
 href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a moz-do-not-send="true"
 onclick="return top.js.OpenExtLink(window,event,this)"
 href="https://lists.jboss.org/mailman/listinfo/rules-users"
 target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </span></pre>
    </blockquote>
    <br>
&nbsp;</div>
    <br>
_______________________________________________<br>
rules-users mailing list<br>
    <a moz-do-not-send="true"
 onclick="return top.js.OpenExtLink(window,event,this)"
 href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
    <a moz-do-not-send="true"
 onclick="return top.js.OpenExtLink(window,event,this)"
 href="https://lists.jboss.org/mailman/listinfo/rules-users"
 target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users
    </a><br>
    <br>
  </blockquote>
  </div>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </pre>
</blockquote>
<br>
</body>
</html>