<!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 are binding the result of the 'or' to <font face="Verdana"><font
 size="2"><font color="#0000ff">EtsExecutionOrderXref_core00 </font></font></font>as
the second part is a 'not' which returns nothing, how would it be bound
to?<br>
<br>
Shah, Malay wrote:
<blockquote
 cite="mid:58A2A0069BCCBD4EA2F204631427BB9D01AFA494@NYWEXMBX2130.msad.ms.com"
 type="cite">
  <meta content="text/html; charset=us-ascii" http-equiv="Content-Type">
  <meta content="text/html; charset=us-ascii" http-equiv="Content-Type">
  <meta content="MSHTML 6.00.6000.16915" name="GENERATOR">
  <div>
  <div><span class="231283223-01122009"><font face="Verdana" size="2">Hi
All,</font></span></div>
  <div>&nbsp;</div>
  <div><span class="231283223-01122009"><font face="Verdana" size="2">I
have the following drool rule that has "or not" under Entity Block.
Basically, the rule tries to check if&nbsp;there either exists an entity
object EtsExecutionOrderXref_core00 with&nbsp;the&nbsp;given conditions, or the
entity does not exist at all with some other conditions.&nbsp;</font></span></div>
  <div><span class="231283223-01122009"><font size="2">&nbsp;</font></span></div>
  <div><span class="231283223-01122009"></span><font face="Verdana"><font
 size="2"><font color="#0000ff">dialect "mvel"<br>
rule "Legacy ETSDB Rule"<br>
when<br>
EtsExecutionOrderHist_core0:EtsExecutionOrderHist_core(customerOrFirm
!= "0")<br>
EtsExecutionOrderXref_core00:<br>
(<br>
&nbsp;EtsExecutionOrderXref_core<br>
&nbsp;(<br>
&nbsp;&nbsp;entityOID == EtsExecutionOrderHist_core0.entityOID , entityRID ==
EtsExecutionOrderHist_core0.entityRID , entityVID ==
EtsExecutionOrderHist_core0.entityVID , referenceID != "2" &amp;&amp;
referenceIDType == "orderSubCapacity"<br>
&nbsp;)<br>
&nbsp;or not(EtsExecutionOrderXref_core<br>
&nbsp;(<br>
&nbsp;&nbsp;entityOID == EtsExecutionOrderHist_core0.entityOID , entityRID ==
EtsExecutionOrderHist_core0.entityRID , entityVID ==
EtsExecutionOrderHist_core0.entityVID , referenceIDType ==
"orderSubCapacity"<br>
&nbsp;))<br>
)<br>
  </font>then<br>
end</font></font></div>
  <div>&nbsp;</div>
  <div><font color="#0000ff" face="Verdana" size="2">But, while
compiling the rule, I am getting the following errors:</font></div>
  <div>&nbsp;</div>
  <div><font face="Verdana" size="2"><font size="2">org.drools.compiler.DroolsParserException:
[ERR 101] Line 22:16 no viable alternative at input </font><font
 color="#2a00ff" size="2"><font color="#2a00ff" size="2">'entityOID'</font></font><font
 size="2"> in rule "Legacy ETSDB Rule" in pattern not, </font></font></div>
  <div>
  <p><font face="Verdana" size="2"><font size="2">org.drools.compiler.DroolsParserException:
[ERR 102] Line 22:68 mismatched input </font><font color="#2a00ff"
 size="2"><font color="#2a00ff" size="2">','</font></font><font size="2">
expecting </font><font color="#2a00ff" size="2"><font color="#2a00ff"
 size="2">'('</font></font><font size="2"> in rule "Legacy ETSDB Rule"
in pattern EtsExecutionOrderHist_core0.entityOID, </font></font></p>
  <p><font face="Verdana" size="2"><font size="2">org.drools.compiler.DroolsParserException:
[ERR 102] Line 22:122 mismatched input </font><font color="#2a00ff"
 size="2"><font color="#2a00ff" size="2">','</font></font><font size="2">
expecting </font><font color="#2a00ff" size="2"><font color="#2a00ff"
 size="2">'('</font></font><font size="2"> in rule "Legacy ETSDB Rule"
in pattern EtsExecutionOrderHist_core0.entityOID in pattern
EtsExecutionOrderHist_core0.entityRID, </font></font></p>
  <p><font face="Verdana" size="2"><font size="2">org.drools.compiler.DroolsParserException:
[ERR 102] Line 22:176 mismatched input </font><font color="#2a00ff"
 size="2"><font color="#2a00ff" size="2">','</font></font><font size="2">
expecting </font><font color="#2a00ff" size="2"><font color="#2a00ff"
 size="2">'('</font></font><font size="2"> in rule "Legacy ETSDB Rule"
in pattern EtsExecutionOrderHist_core0.entityOID in pattern
EtsExecutionOrderHist_core0.entityRID in pattern
EtsExecutionOrderHist_core0.entityVID]</font></font></p>
  </div>
  <div><font face="Verdana" size="2"><span class="231283223-01122009">I
think the rule is correct, but am not able to figure out these
compilation errors. Could anybody please comment on why this would
happen? </span></font></div>
  <div>&nbsp;</div>
  <div><span class="231283223-01122009"><font face="Verdana" size="2">Thanks</font></span></div>
  <div>&nbsp;</div>
  <div style="color: black; font-family: arial;"><span
 style="font-size: 10pt;">Malay Shah</span></div>
  </div>
  <div>
  <hr></div>
  <p class="BulletedList" style="margin: 0in 0in 0pt; text-indent: 0in;"><span
 style="font-size: 8pt; color: gray;"><font color="gray" face="Arial"
 size="1">NOTICE: If received in error, please destroy, and notify
sender. Sender does not intend to waive confidentiality or privilege.
Use of this email is prohibited when received in error.&nbsp;We<span
 style="font-size: 7.5pt; color: gray; font-family: 'Arial','sans-serif';">
may monitor and store emails to the extent permitted by applicable law.</span></font></span></p>
  <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>