<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=490394907-13092007><FONT face=Arial 
color=#0000ff size=2>I think there was an API change for 4.0.x - 
"r</FONT></SPAN><SPAN class=490394907-13092007><FONT face=Arial color=#0000ff 
size=2>etract" became "retractObject".</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org 
  [mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of 
  </B>Christopher.Mathrusse@sybase.com<BR><B>Sent:</B> 13 September 2007 
  02:18<BR><B>To:</B> Rules Users List<BR><B>Subject:</B> Re: [rules-users] 
  Assistance with DSL syntax<BR></FONT><BR></DIV>
  <DIV></DIV><BR><FONT face=sans-serif size=2>I was just looking for a more 
  "short hand" syntax, one where I would not need to declare 
  <I>"theOrder".</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> <BR><BR><FONT face="Courier New" size=2>[consequence][]Manually 
  release the Order=setManualRelease(drools.getRule().getName());</FONT><FONT 
  face="Courier New" color=red 
  size=2><B><I>retract(theOrder);</I></B></FONT><FONT size=3> 
  </FONT><BR><BR><BR><FONT face=sans-serif size=2>It seems that there is an 
  issue with the </FONT><FONT face="Courier New" color=red 
  size=2><B><I>retract(theOrder);</I></B></FONT><FONT face=sans-serif 
  size=2>statement.</FONT> <BR><BR><FONT face=sans-serif color=red 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>"Edson Tirelli" 
        &lt;tirelli@post.com&gt;</B> </FONT><BR><FONT face=sans-serif 
        size=1>Sent by: rules-users-bounces@lists.jboss.org</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;rules-users@lists.jboss.org&gt;</FONT></DIV></TR></TBODY></TABLE><BR></P>
      <TD width="59%">
        <TABLE width="100%">
          <TBODY>
          <TR>
            <TD>
              <DIV align=right><FONT face=sans-serif size=1>To</FONT></DIV>
            <TD vAlign=top><FONT face=sans-serif size=1>"Rules Users List" 
              &lt;rules-users@lists.jboss.org&gt;</FONT> 
          <TR>
            <TD>
              <DIV align=right><FONT face=sans-serif size=1>cc</FONT></DIV>
            <TD vAlign=top>
          <TR>
            <TD>
              <DIV align=right><FONT face=sans-serif size=1>Subject</FONT></DIV>
            <TD vAlign=top><FONT face=sans-serif size=1>Re: [rules-users] 
              Assistance with DSL syntax</FONT></TR></TBODY></TABLE><BR>
        <TABLE>
          <TBODY>
          <TR vAlign=top>
            <TD>
            <TD></TR></TBODY></TABLE><BR></TR></TBODY></TABLE><BR><BR><BR><FONT 
  size=3><BR>&nbsp; Yes, that is correct. <BR>&nbsp; Why do you mean by a 
  "cleaner" 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 color=blue 
  size=3><U>Christopher.Mathrusse@sybase.com </U></FONT></A><FONT 
  size=3>&lt;</FONT><A href="mailto:Christopher.Mathrusse@sybase.com"><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'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 face=sans-serif size=2><BR>My rule 
  in the DRL:</FONT><FONT size=3> </FONT><FONT face="Courier New" color=#a00000 
  size=2><B><BR>rule</B></FONT><FONT face="Courier New" size=2> </FONT><FONT 
  face="Courier New" color=#008000 size=2>"Maximum Order Amount 
  Exceeded"</FONT><FONT size=3> </FONT><FONT face="Courier New" color=#a00000 
  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 face="Courier New" color=#a00000 
  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 face="Courier New" color=#a00000 
  size=2><B>is</B></FONT><FONT face="Courier New" size=2> an Order </FONT><FONT 
  face="Courier New" color=#a00000 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 face="Courier New" 
  color=#a00000 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 
  face="Courier New" color=#a00000 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 
  face="Courier New" color=red 
  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 face="Courier New" color=red 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"><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><FONT color=blue 
  size=3><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 color=blue 
  size=3><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></BLOCKQUOTE></BODY></HTML>