<br><font size=2 face="sans-serif">My mvel version is mvel 2.0..Can you
suggets which mvel version should I be using?</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;Edson Tirelli&quot;
&lt;tirelli@post.com&gt;</b> </font>
<br><font size=1 face="sans-serif">Sent by: rules-users-bounces@lists.jboss.org</font>
<p><font size=1 face="sans-serif">11/06/2008 03:12 PM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
Rules Users List &lt;rules-users@lists.jboss.org&gt;</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">&quot;Rules Users List&quot; &lt;rules-users@lists.jboss.org&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [rules-users] DROOLS from clause
giving Error</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3><br>
 &nbsp; This is an MVEL problem that Mike fixed in one of the latest versions:
it was raising that error message when unable to resolve a variable reference
(processor in this case).<br>
<br>
 &nbsp; Can you please confirm what versions of drools and mvel are you
using?<br>
<br>
 &nbsp; Also, try to use mvel syntax, just in case:<br>
</font><font size=2 face="Courier New"><br>
$x : DBSubscription(report == $event.report) </font><font size=2 color=#a00000 face="Courier New"><b>from</b></font><font size=2 face="Courier New">
processor.users</font><font size=3><br>
<br>
 &nbsp; []s<br>
 &nbsp; Edson<br>
</font>
<br><font size=3>2008/11/6 &lt;</font><a href=mailto:shikha.x.aggarwal@jpmchase.com><font size=3 color=blue><u>shikha.x.aggarwal@jpmchase.com</u></font></a><font size=3>&gt;</font>
<br><font size=2 face="sans-serif"><br>
Thanks for the quick respose..I modified the rule now to -</font><font size=3>
<br>
</font><font size=2 color=#a00000 face="Courier New"><b><br>
package</b></font><font size=2 face="Courier New"> org.drools.examples;</font><font size=3>
<br>
</font><font size=2 color=#a00000 face="Courier New"><b><br>
import</b></font><font size=2 face="Courier New"> org.drools.examples.templates.DBSubscription;</font><font size=3>
</font><font size=2 color=#a00000 face="Courier New"><b><br>
import</b></font><font size=2 face="Courier New"> org.drools.examples.templates.Event;</font><font size=3>
<br>
</font><font size=2 color=#a00000 face="Courier New"><b><br>
global</b></font><font size=2 face="Courier New"> java.util.List list</font><font size=3>
</font><font size=2 color=#a00000 face="Courier New"><b><br>
global</b></font><font size=2 face="Courier New"> org.drools.examples.Processor
processor;</font><font size=3> </font>
<br><font size=2 color=#a00000 face="Courier New"><b><br>
rule</b></font><font size=2 face="Courier New"> </font><font size=2 color=#008000 face="Courier New">&quot;Rule1&quot;</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; </font><font size=2 color=#a00000 face="Courier New"><b>when</b></font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$event : Event(eventId == </font><font size=2 color=#008000 face="Courier New">&quot;eventId.IR.001&quot;</font><font size=2 face="Courier New">)
&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; $x : DBSubscription(report == $event.report) </font><font size=2 color=#a00000 face="Courier New"><b>from</b></font><font size=2 face="Courier New">
processor.getUsers() &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#a00000 face="Courier New"><b>then</b></font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;list.add($x); &nbsp;
&nbsp; &nbsp; &nbsp;</font><font size=3> </font><font size=2 color=#a00000 face="Courier New"><b><br>
end</b></font><font size=3> <br>
</font><font size=2 face="Courier New"><b><br>
Still facing some issue, Looking into it</b></font><font size=3> <br>
</font><font size=2 color=red face="Courier New"><br>
Exception in thread &quot;main&quot; [Error: unbalanced braces ( ... )]</font><font size=3>
</font><font size=2 color=red face="Courier New"><br>
[Near : {... processor.getUsers( ....}]</font><font size=3> </font><font size=2 color=red face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;at org.mvel.util.ParseTools.balancedCapture(</font><font size=2 color=#000080 face="Courier New"><u>ParseTools.java:1134</u></font><font size=2 color=red face="Courier New">)</font><font size=3>
</font><font size=2 color=red face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(</font><font size=2 color=#000080 face="Courier New"><u>ReflectiveAccessorOptimizer.java:550</u></font><font size=2 color=red face="Courier New">)</font><font size=3>
</font><font size=2 color=red face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(</font><font size=2 color=#000080 face="Courier New"><u>ReflectiveAccessorOptimizer.java:438</u></font><font size=2 color=red face="Courier New">)</font><font size=3>
</font><font size=2 color=red face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(</font><font size=2 color=#000080 face="Courier New"><u>ReflectiveAccessorOptimizer.java:265</u></font><font size=2 color=red face="Courier New">)</font><font size=3>
</font><font size=2 color=red face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(</font><font size=2 color=#000080 face="Courier New"><u>ReflectiveAccessorOptimizer.java:126</u></font><font size=2 color=red face="Courier New">)</font><font size=3>
</font><font size=2 color=red face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;at org.mvel.ast.ASTNode.getReducedValueAccelerated(</font><font size=2 color=#000080 face="Courier New"><u>ASTNode.java:141</u></font><font size=2 color=red face="Courier New">)</font><font size=3>
</font><font size=2 color=red face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;at org.mvel.MVELRuntime.execute(</font><font size=2 color=#000080 face="Courier New"><u>MVELRuntime.java:77</u></font><font size=2 color=red face="Courier New">)</font><font size=3>
<br>
<br>
<br>
</font>
<table width=100%>
<tr valign=top>
<td width=50%><font size=1 face="sans-serif"><b>&quot;David Sinclair&quot;
&lt;</b></font><a href=mailto:dsinclair@chariotsolutions.com target=_blank><font size=1 color=blue face="sans-serif"><b><u>dsinclair@chariotsolutions.com</u></b></font></a><font size=1 face="sans-serif"><b>&gt;</b>
<br>
Sent by: </font><a href="mailto:rules-users-bounces@lists.jboss.org" target=_blank><font size=1 color=blue face="sans-serif"><u>rules-users-bounces@lists.jboss.org</u></font></a><font size=3>
</font>
<p><font size=1 face="sans-serif">11/06/2008 02:19 PM</font><font size=3>
</font>
<p>
<br>
<table border=4 width=100%>
<tr valign=top>
<td width=100% bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
Rules Users List &lt;</font><a href="mailto:rules-users@lists.jboss.org" target=_blank><font size=1 color=blue face="sans-serif"><u>rules-users@lists.jboss.org</u></font></a><font size=1 face="sans-serif">&gt;</font></div></table>
<br>
<td width=49%>
<table width=100%>
<tr valign=top>
<td width=13%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=86%><font size=1 face="sans-serif">&quot;Rules Users List&quot;
&lt;</font><a href="mailto:rules-users@lists.jboss.org" target=_blank><font size=1 color=blue face="sans-serif"><u>rules-users@lists.jboss.org</u></font></a><font size=1 face="sans-serif">&gt;</font><font size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [rules-users] DROOLS from clause
giving Error</font></table>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=50%>
<td width=50%></table>
<br></table>
<br><font size=3><br>
<br>
<br>
What is Processor? Doesn't look like it is a bound variable. Is it from
DBSubscription? <br>
<br>
On Thu, Nov 6, 2008 at 2:11 PM, &lt;</font><a href=mailto:shikha.x.aggarwal@jpmchase.com target=_blank><font size=3 color=blue><u>shikha.x.aggarwal@jpmchase.com</u></font></a><font size=3>&gt;
wrote: </font><font size=2 face="sans-serif"><br>
<br>
Hi, <br>
<br>
I am using the from clause of drools and have written the following expression
- </font><font size=2 color=#a00000 face="Courier New"><b><br>
rule</b></font><font size=2 face="Courier New"> </font><font size=2 color=#008000 face="Courier New">&quot;Rule1&quot;</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp;</font><font size=2 color=#a00000 face="Courier New"><b>when</b></font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $event : Event(eventId
== </font><font size=2 color=#008000 face="Courier New">&quot;eventId.IR.001&quot;</font><font size=2 face="Courier New">),</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $dbS : DBSubscription(
report == $event.report ) </font><font size=2 color=#a00000 face="Courier New"><b>from</b></font><font size=2 face="Courier New">
Processor.getUsers()</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; </font><font size=2 color=#a00000 face="Courier New"><b>then</b></font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; list.add($dbS); &nbsp;
&nbsp; &nbsp; &nbsp;</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
Here processor.getUsers writtens me a list of DBSubscription, When I load
this package using </font><font size=2 face="Courier New"><br>
 builder.addPackageFromDrl( source );</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
I get an error saying - </font><font size=2 color=red face="Courier New"><br>
Exception in thread &quot;main&quot; </font><font size=2 color=#000080 face="Courier New"><u>org.drools.compiler.DroolsParserException</u></font><font size=2 color=red face="Courier New">:
<b>Unknown error while parsing. This is a bug. Please contact the Development
team.</b></font><font size=3> </font><font size=2 color=red face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; at org.drools.compiler.DrlParser.compile(</font><font size=2 color=#000080 face="Courier New"><u>DrlParser.java:219</u></font><font size=2 color=red face="Courier New">)</font><font size=3>
</font><font size=2 color=red face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; at org.drools.compiler.DrlParser.parse(</font><font size=2 color=#000080 face="Courier New"><u>DrlParser.java:73</u></font><font size=2 color=red face="Courier New">)</font><font size=3>
</font><font size=2 color=red face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; at org.drools.compiler.DrlParser.parse(</font><font size=2 color=#000080 face="Courier New"><u>DrlParser.java:77</u></font><font size=2 color=red face="Courier New">)</font><font size=3>
</font><font size=2 face="sans-serif"><br>
<br>
Would Appreciate any help on the same.</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
thanks</font><font size=3> </font><font size=2 face="sans-serif"><br>
Shikha</font><font size=3> </font>
<p>
<hr>
<p><font size=3>This communication is for informational purposes only.
It is not intended as an offer or solicitation for the purchase or sale
of any financial instrument or as an official confirmation of any transaction.
All market prices, data and other information are not warranted as to completeness
or accuracy and are subject to change without notice. Any comments or statements
made herein do not necessarily reflect those of JPMorgan Chase &amp; Co.,
its subsidiaries and affiliates. This transmission may contain information
that is privileged, confidential, legally privileged, and/or exempt from
disclosure under applicable law. If you are not the intended recipient,
you are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance thereon)
is STRICTLY PROHIBITED. Although this transmission and any attachments
are believed to be free of any virus or other defect that might affect
any computer system into which it is received and opened, it is the responsibility
of the recipient to ensure that it is virus free and no responsibility
is accepted by JPMorgan Chase &amp; Co., its subsidiaries and affiliates,
as applicable, for any loss or damage arising in any way from its use.
If you received this transmission in error, please immediately contact
the sender and destroy the material in its entirety, whether in electronic
or hard copy format. Thank you. Please refer to </font><a href=http://www.jpmorgan.com/pages/disclosures target=_blank><font size=3 color=blue><u>http://www.jpmorgan.com/pages/disclosures</u></font></a><font size=3>
for disclosures relating to UK legal entities. </font>
<p><font size=3><br>
_______________________________________________<br>
rules-users mailing list</font><font size=3 color=blue><u><br>
</u></font><a href="mailto:rules-users@lists.jboss.org" target=_blank><font size=3 color=blue><u>rules-users@lists.jboss.org</u></font></a><font size=3 color=blue><u><br>
</u></font><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target=_blank><font size=3 color=blue><u>https://lists.jboss.org/mailman/listinfo/rules-users</u></font></a><font size=3><br>
</font><font size=2><tt><br>
_______________________________________________<br>
rules-users mailing list</tt></font><font size=2 color=blue><tt><u><br>
</u></tt></font><a href="mailto:rules-users@lists.jboss.org" target=_blank><font size=2 color=blue><tt><u>rules-users@lists.jboss.org</u></tt></font></a><font size=2 color=blue><tt><u><br>
</u></tt></font><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target=_blank><font size=2 color=blue><tt><u>https://lists.jboss.org/mailman/listinfo/rules-users</u></tt></font></a><font size=3><br>
</font>
<p>
<hr>
<p><font size=3>This communication is for informational purposes only.
It is not intended as an offer or solicitation for the purchase or sale
of any financial instrument or as an official confirmation of any transaction.
All market prices, data and other information are not warranted as to completeness
or accuracy and are subject to change without notice. Any comments or statements
made herein do not necessarily reflect those of JPMorgan Chase &amp; Co.,
its subsidiaries and affiliates. This transmission may contain information
that is privileged, confidential, legally privileged, and/or exempt from
disclosure under applicable law. If you are not the intended recipient,
you are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance thereon)
is STRICTLY PROHIBITED. Although this transmission and any attachments
are believed to be free of any virus or other defect that might affect
any computer system into which it is received and opened, it is the responsibility
of the recipient to ensure that it is virus free and no responsibility
is accepted by JPMorgan Chase &amp; Co., its subsidiaries and affiliates,
as applicable, for any loss or damage arising in any way from its use.
If you received this transmission in error, please immediately contact
the sender and destroy the material in its entirety, whether in electronic
or hard copy format. Thank you. Please refer to </font><a href=http://www.jpmorgan.com/pages/disclosures target=_blank><font size=3 color=blue><u>http://www.jpmorgan.com/pages/disclosures</u></font></a><font size=3>
for disclosures relating to UK legal entities. </font>
<p><font size=3><br>
_______________________________________________<br>
rules-users mailing list</font><font size=3 color=blue><u><br>
</u></font><a href="mailto:rules-users@lists.jboss.org"><font size=3 color=blue><u>rules-users@lists.jboss.org</u></font></a><font size=3 color=blue><u><br>
</u></font><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target=_blank><font size=3 color=blue><u>https://lists.jboss.org/mailman/listinfo/rules-users</u></font></a><font size=3><br>
</font>
<br><font size=3><br>
<br>
<br>
-- <br>
 Edson Tirelli<br>
 JBoss Drools Core Development<br>
 JBoss, a division of Red Hat @ </font><a href=http://www.jboss.com/><font size=3 color=blue><u>www.jboss.com</u></font></a><font size=2><tt>_______________________________________________<br>
rules-users mailing list<br>
rules-users@lists.jboss.org<br>
https://lists.jboss.org/mailman/listinfo/rules-users<br>
</tt></font>
<br>
<P><hr size=1></P>
<P>
This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates.

This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.

Please refer to http://www.jpmorgan.com/pages/disclosures for disclosures relating to UK legal entities.
</P>