<br>&nbsp;&nbsp; Yes, that is correct. <br>&nbsp;&nbsp; Why do you mean by a &quot;cleaner&quot; way?<br><br>&nbsp;&nbsp;&nbsp; []s<br>&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&#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>
<br>
<br><font face="sans-serif" size="2">My rule in the DRL:</font>
<br><font color="#a00000" face="Courier New" size="2"><b>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>
<br><font color="#a00000" face="Courier New" size="2"><b>salience</b></font><font face="Courier New" size="2">
9800</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font color="#a00000" face="Courier New" size="2"><b>when</b></font>
<br><font face="Courier New" size="2">&nbsp; &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>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- an amount that exceeds 100000
&nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font color="#a00000" face="Courier New" size="2"><b>then</b></font><font face="Courier New" size="2">
</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; Manually release the Order</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </font>
<br><font color="#a00000" face="Courier New" size="2"><b>end</b></font>
<br>
<br>
<br><font face="sans-serif" size="2">My DSL:</font>
<br><font face="Courier New" size="2">[condition][]There is an Order with=Order()</font>
<br><font face="Courier New" size="2">[condition][]- an amount that exceeds
{number}=amount &gt;= {number}</font>
<br><font face="Courier New" size="2">[consequence][]Manually release the
Order=setManualRelease(drools.getRule().getName());</font>
<br>
<br><font face="sans-serif" size="2">What I would like to do is add to my
consequence the following in red:</font>
<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>
<br>
<br>
<br><font face="sans-serif" size="2">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>
<br><font face="Courier New" size="2">[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>
<br>
<br>
<br><font face="sans-serif" size="2">but is there a cleaner way to achieve
this?</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>