<br> Yes, that is correct. <br> Why do you mean by a "cleaner" way?<br><br> []s<br> Edson<br><br><div><span class="gmail_quote">2007/9/12, <a href="mailto:Christopher.Mathrusse@sybase.com">Christopher.Mathrusse@sybase.com
</a> <<a href="mailto:Christopher.Mathrusse@sybase.com">Christopher.Mathrusse@sybase.com</a>>:</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'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>
<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">"Maximum Order
Amount Exceeded"</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"> </font><font color="#a00000" face="Courier New" size="2"><b>when</b></font>
<br><font face="Courier New" size="2">
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">
- an amount that exceeds 100000
</font>
<br><font face="Courier New" size="2"> </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">
Manually release the Order</font>
<br><font face="Courier New" size="2">
</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 >= {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>
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> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646
<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>