<br><font size=2 face="sans-serif">I was just looking for a more &quot;short
hand&quot; syntax, one where I would not need to declare <i>&quot;theOrder&quot;.</i></font>
<br>
<br><font size=2 face="sans-serif">On the same subject though, I compiled
my rules with the DRL/DSL editors in Eclipse (very nice by the way) and
I am getting a compilation error being caused by my DSL entry:</font>
<br>
<br><font size=2 face="Courier New">[consequence][]Manually release the
Order=setManualRelease(drools.getRule().getName());</font><font size=2 color=red face="Courier New"><b><i>retract(theOrder);</i></b></font><font size=3>
</font>
<br>
<br>
<br><font size=2 face="sans-serif">It seems that there is an issue with
the </font><font size=2 color=red face="Courier New"><b><i>retract(theOrder);</i></b></font><font size=2 face="sans-serif">statement.</font>
<br>
<br><font size=2 color=red face="sans-serif"><i>The method retract(Order)
is undefined for the type Rule_Maximum_Order_Amount_Exceeded_0 &nbsp; &nbsp;
&nbsp; &nbsp;</i></font>
<br>
<br><font size=2 face="sans-serif">Might you have any idea as to why this
would be occurring or exactly what the message is meaning?</font>
<br>
<br><font size=2 face="sans-serif">Thanks for the help...</font>
<br><font size=2 face="sans-serif"><br>
</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">09/12/2007 05:55 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>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">&quot;Rules Users List&quot;
&lt;rules-users@lists.jboss.org&gt;</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">Re: [rules-users] Assistance
with DSL syntax</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3><br>
 &nbsp; Yes, that is correct. <br>
 &nbsp; Why do you mean by a &quot;cleaner&quot; way?<br>
<br>
 &nbsp; &nbsp;[]s<br>
 &nbsp; &nbsp;Edson<br>
</font>
<br><font size=3>2007/9/12, </font><a href=mailto:Christopher.Mathrusse@sybase.com><font size=3 color=blue><u>Christopher.Mathrusse@sybase.com
</u></font></a><font size=3>&lt;</font><a href=mailto:Christopher.Mathrusse@sybase.com><font size=3 color=blue><u>Christopher.Mathrusse@sybase.com</u></font></a><font size=3>&gt;:</font>
<br><font size=2 face="sans-serif"><br>
I'm using a DSL with my DRL file and I've read through the documentation
but I've gotten hung-up on the syntax. Below is a rule from my DRL and
the expansion in my DSL.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
My rule in the DRL:</font><font size=3> </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;Maximum
Order Amount Exceeded&quot;</font><font size=3> </font><font size=2 color=#a00000 face="Courier New"><b><br>
salience</b></font><font size=2 face="Courier New"> 9800</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &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; &nbsp; &nbsp; There </font><font size=2 color=#a00000 face="Courier New"><b>is</b></font><font size=2 face="Courier New">
an Order </font><font size=2 color=#a00000 face="Courier New"><b>with</b></font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - an amount
that exceeds 100000 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#a00000 face="Courier New"><b>then</b></font><font size=2 face="Courier New">
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Manually release
the Order</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#a00000 face="Courier New"><b><br>
end</b></font><font size=3> <br>
<br>
</font><font size=2 face="sans-serif"><br>
My DSL:</font><font size=3> </font><font size=2 face="Courier New"><br>
[condition][]There is an Order with=Order()</font><font size=3> </font><font size=2 face="Courier New"><br>
[condition][]- an amount that exceeds {number}=amount &gt;= {number}</font><font size=3>
</font><font size=2 face="Courier New"><br>
[consequence][]Manually release the Order=setManualRelease(drools.getRule().getName());</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
What I would like to do is add to my consequence the following in red:</font><font size=3>
</font><font size=2 face="Courier New"><br>
[consequence][]Manually release the Order=setManualRelease(drools.getRule().getName());</font><font size=2 color=red face="Courier New"><b><i>retract(theOrder);</i></b></font><font size=3>
<br>
<br>
</font><font size=2 face="sans-serif"><br>
I know that I would need to modify my condition statement to be able to
use the variable <b><i>theOrder</i></b> &nbsp;in my call to retract:</font><font size=3>
</font><font size=2 face="Courier New"><br>
[condition][]There is an Order with=</font><font size=2 color=red face="Courier New"><b><i>theOrder
</i></b></font><font size=2 face="Courier New">: Order()</font><font size=3>
<br>
<br>
</font><font size=2 face="sans-serif"><br>
but is there a cleaner way to achieve this?</font><font size=3> <br>
<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>
 &nbsp;Edson Tirelli<br>
 &nbsp;Software Engineer - JBoss Rules Core Developer<br>
 &nbsp;Office: +55 11 3529-6000<br>
 &nbsp;Mobile: +55 11 9287-5646 <br>
 &nbsp;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=3>
</font><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>