<br>&nbsp;&nbsp;&nbsp; No, you need to identify which object are you trying to retract, since you may have multiple facts constrained in the LHS.<br><br>&nbsp;&nbsp;&nbsp; Regarding your problem, make sure your rules file has the extension &quot;.dslr&quot; so that eclipse selects the correct editor when opening the file. Then click in the DRL preview in the editor bottom tab. Can you please show me the result of the DRL preview?
<br><br>&nbsp;&nbsp;&nbsp; Thanks<br>&nbsp;&nbsp;&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/9/12, <a href="mailto:Christopher.Mathrusse@sybase.com">Christopher.Mathrusse@sybase.com</a> &lt;<a href="mailto:Christopher.Mathrusse@sybase.com">
Christopher.Mathrusse@sybase.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><font face="sans-serif" size="2">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 face="sans-serif" size="2">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>
<span class="q"><br>
<br><font face="Courier New" size="2">[consequence][]Manually release the
Order=setManualRelease(drools.getRule().getName());</font><font color="red" face="Courier New" size="2"><b><i>retract(theOrder);</i></b></font><font size="3">
</font>
<br>
<br>
<br></span><font face="sans-serif" size="2">It seems that there is an issue with
the </font><font color="red" face="Courier New" size="2"><b><i>retract(theOrder);</i></b></font><font face="sans-serif" size="2">statement.</font>
<br>
<br><font color="red" face="sans-serif" size="2"><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 face="sans-serif" size="2">Might you have any idea as to why this
would be occurring or exactly what the message is meaning?</font>
<br>
<br><font face="sans-serif" size="2">Thanks for the help...</font>
<br><font face="sans-serif" size="2"><br>
</font>
<br>
<br>
<br>
<table width="100%">
<tbody><tr valign="top">
<td width="40%"><font face="sans-serif" size="1"><b>&quot;Edson Tirelli&quot;
&lt;<a href="mailto:tirelli@post.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">tirelli@post.com</a>&gt;</b> </font>
<br><font face="sans-serif" size="1">Sent by: <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users-bounces@lists.jboss.org</a></font>
<p><font face="sans-serif" size="1">09/12/2007 05:55 PM</font>
<table border="1">
<tbody><tr valign="top">
<td bgcolor="white">
<div align="center"><font face="sans-serif" size="1">Please respond to<br>
Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users@lists.jboss.org</a>&gt;</font></div></td></tr></tbody></table>
<br>
</p></td><td width="59%">
<table width="100%">
<tbody><tr>
<td>
<div align="right"><font face="sans-serif" size="1">To</font></div>
</td><td valign="top"><font face="sans-serif" size="1">&quot;Rules Users List&quot;
&lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users@lists.jboss.org</a>&gt;</font>
</td></tr><tr>
<td>
<div align="right"><font face="sans-serif" size="1">cc</font></div>
</td><td valign="top">
<br></td></tr><tr>
<td>
<div align="right"><font face="sans-serif" size="1">Subject</font></div>
</td><td valign="top"><font face="sans-serif" size="1">Re: [rules-users] Assistance
with DSL syntax</font></td></tr></tbody></table>
<br>
<table>
<tbody><tr valign="top">
<td>
<br></td><td><br></td></tr></tbody></table>
<br></td></tr></tbody></table><div><span class="e" id="q_114fc7b379d195ed_3">
<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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"><font color="blue" size="3"><u>Christopher.Mathrusse@sybase.com
</u></font></a><font size="3">&lt;</font><a href="mailto:Christopher.Mathrusse@sybase.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"><font color="blue" size="3"><u>Christopher.Mathrusse@sybase.com
</u></font></a><font size="3">&gt;:</font>
<br><font face="sans-serif" size="2"><br>
I&#39;m using a DSL with my DRL file and I&#39;ve read through the documentation
but I&#39;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 face="sans-serif" size="2"><br>
My rule in the DRL:</font><font size="3"> </font><font color="#a00000" face="Courier New" size="2"><b><br>
rule</b></font><font face="Courier New" size="2"> </font><font color="#008000" face="Courier New" size="2">&quot;Maximum
Order Amount Exceeded&quot;</font><font size="3"> </font><font color="#a00000" face="Courier New" size="2"><b><br>
salience</b></font><font face="Courier New" size="2"> 9800</font><font size="3">
</font><font face="Courier New" size="2"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font color="#a00000" face="Courier New" size="2"><b>when</b></font><font size="3">
</font><font face="Courier New" size="2"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; There </font><font color="#a00000" face="Courier New" size="2"><b>is</b></font><font face="Courier New" size="2">
an Order </font><font color="#a00000" face="Courier New" size="2"><b>with</b></font><font size="3">
</font><font face="Courier New" size="2"><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 face="Courier New" size="2"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font color="#a00000" face="Courier New" size="2"><b>then</b></font><font face="Courier New" size="2">
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Manually release
the Order</font><font size="3"> </font><font face="Courier New" size="2"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font color="#a00000" face="Courier New" size="2"><b><br>
end</b></font><font size="3"> <br>
<br>
</font><font face="sans-serif" size="2"><br>
My DSL:</font><font size="3"> </font><font face="Courier New" size="2"><br>
[condition][]There is an Order with=Order()</font><font size="3"> </font><font face="Courier New" size="2"><br>
[condition][]- an amount that exceeds {number}=amount &gt;= {number}</font><font size="3">
</font><font face="Courier New" size="2"><br>
[consequence][]Manually release the Order=setManualRelease(drools.getRule().getName());</font><font size="3">
<br>
</font><font face="sans-serif" size="2"><br>
What I would like to do is add to my consequence the following in red:</font><font size="3">
</font><font face="Courier New" size="2"><br>
[consequence][]Manually release the Order=setManualRelease(drools.getRule().getName());</font><font color="red" face="Courier New" size="2"><b><i>retract(theOrder);</i></b></font><font size="3">
<br>
<br>
</font><font face="sans-serif" size="2"><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 face="Courier New" size="2"><br>
[condition][]There is an Order with=</font><font color="red" face="Courier New" size="2"><b><i>theOrder
</i></b></font><font face="Courier New" size="2">: Order()</font><font size="3">
<br>
<br>
</font><font face="sans-serif" size="2"><br>
but is there a cleaner way to achieve this?</font><font size="3"> <br>
<br>
_______________________________________________<br>
rules-users mailing list</font><font color="blue" size="3"><u><br>
</u></font><a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"><font color="blue" size="3"><u>rules-users@lists.jboss.org</u></font></a><font color="blue" size="3">
<u><br>
</u></font><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"><font color="blue" size="3"><u>https://lists.jboss.org/mailman/listinfo/rules-users
</u></font></a><font size="3"><br>
</font>
<br></span></div><font size="3"></font><div><span class="e" id="q_114fc7b379d195ed_5"><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></font></span></div>
<font size="3"> &nbsp;JBoss, a division of Red Hat @ </font><a href="http://www.jboss.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"><font color="blue" size="3"><u>www.jboss.com</u></font></a><font size="3">

</font><font size="2"><tt>_______________________________________________<span class="q"><br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</span></tt></font>
<br>
<br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a 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><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646
<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>