Hi,<br><br>Definatelly it&#39;s a bug in the literalrestrictionhandler, <a href="http://jira.jboss.org/jira/browse/JBRULES-1248">http://jira.jboss.org/jira/browse/JBRULES-1248</a>&nbsp; and it&#39;s already available in the 4.0.2-snapshot
<br><br>Regards <br><br><div><span class="gmail_quote">On 10/4/07, <b class="gmail_sendername">Anstis, Michael (M.)</b> &lt;<a href="mailto:manstis1@ford.com">manstis1@ford.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Forwarded to user group under condition &quot;#4. Send emails 
directly to mailing list members, especially the developers&quot; of the forum 
guidelines.</font></span></div><br>
<blockquote style="margin-right: 0px;">
  <div dir="ltr" align="left" lang="en-us">
  <hr>
  <font face="Tahoma" size="2"><b>From:</b> <a href="mailto:prateek.katiyar@wipro.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">prateek.katiyar@wipro.com</a> 
  [mailto:<a href="mailto:prateek.katiyar@wipro.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">prateek.katiyar@wipro.com</a>] <br><b>Sent:</b> 04 October 2007 
  07:42<br><b>To:</b> Anstis, Michael (M.)<br><b>Subject:</b> About Quotes in 
  Xml file<br></font><br></div>
  <div></div>
  <div dir="ltr">
  <div dir="ltr"><font color="#000000" face="Arial" size="2">
  </font><div dir="ltr">
<font color="#000000" face="Arial" size="2">  </font><div dir="ltr"><font color="#000000" face="Arial" size="2"><font color="#000000" face="Arial" size="2">Hi</font></font></div>
<font color="#000000" face="Arial" size="2">  </font><div dir="ltr"><font color="#000000" face="Arial" size="2"><font face="Arial" size="2">Thanks for your reply.</font></font></div>
<font color="#000000" face="Arial" size="2">  </font><div dir="ltr"><font color="#000000" face="Arial" size="2"><font face="Arial" size="2"></font>&nbsp;</font></div>
<font color="#000000" face="Arial" size="2">  </font><div dir="ltr"><font color="#000000" face="Arial" size="2"><font face="Arial" size="2">I have a field &quot;<strong>m_rfqId</strong>&quot; 
  in one of my JavaBean &quot;<strong>RFQBean</strong>&quot;&nbsp;and i want to implement 
  a rule on this field as </font></font></div>
<font color="#000000" face="Arial" size="2">  </font><div dir="ltr"><font color="#000000" face="Arial" size="2"><font size="2"><font face="Arial"></font></font>&nbsp;</font></div>
<font color="#000000" face="Arial" size="2">  </font><div dir="ltr"><font color="#000000" face="Arial" size="2"><font size="2"><font face="Arial"><strong>rule 
  &quot;Check_NotNullof_rfqId&quot;</strong></font></font></font></div>
<font color="#000000" face="Arial" size="2">  </font><div dir="ltr">
<font color="#000000" face="Arial" size="2">  </font><p align="left"><font color="#000000" face="Arial" size="2"><font face="Arial"><strong>agenda-group 
&quot;Check&quot;</strong></font></font></p>
<font color="#000000" face="Arial" size="2">  </font><p align="left"><font color="#000000" face="Arial" size="2"><font face="Arial"><strong>when</strong></font></font></p>
<font color="#000000" face="Arial" size="2">  </font><p align="left"><font color="#000000" face="Arial" size="2"><font face="Arial"><strong>RFQBean((m_rfqId == null)||(m_rfqId == 
  &quot;&quot;))</strong></font></font></p>
<font color="#000000" face="Arial" size="2">  </font><p align="left"><font color="#000000" face="Arial" size="2"><font face="Arial"><strong>then</strong></font></font></p>
<font color="#000000" face="Arial" size="2">  </font><p align="left"><font color="#000000" face="Arial" size="2"><font face="Arial"><strong>response.setStatus(&quot;For RFQ Bean: The 
  value of m_rfqId is null.&quot;);</strong></font></font></p>
<font color="#000000" face="Arial" size="2">  </font><p align="left"><font color="#000000" face="Arial" size="2"><font face="Arial"><strong>System.out.println(response.getStatus());</strong></font></font></p>
<font color="#000000" face="Arial" size="2">  </font><p align="left"><font color="#000000" face="Arial" size="2"><font face="Arial"><strong>end</strong></font></font></p>
<font color="#000000" face="Arial" size="2">  </font><p align="left"><font color="#000000" face="Arial" size="2"><font face="Arial">Now when i used XmlDumper for the .xml format 
  of this rule then i got the following syntax:</font></font></p><font color="#000000" face="Arial" size="2"><font size="2">
  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;rule 
  name=&quot;Check_NotNullof_rfqId&quot;&gt;</font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;rule-attribute name=&quot;agenda-group&quot; 
  value=&quot;Check&quot; /&gt;</font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial"></font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;lhs&gt;&lt;pattern 
  object-type=&quot;RFQBean&quot; &gt;</font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;or-constraint-connective&gt;&lt;field-constraint 
  field-name=&quot;m_rfqId&quot;&gt; </font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;literal-restriction evaluator=&quot;==&quot; 
  value=&quot;null&quot; /&gt;</font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial"></font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;/field-constraint&gt;</font></strong></font>
</font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;field-constraint 
  field-name=&quot;m_rfqId&quot;&gt; </font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;literal-restriction evaluator=&quot;==&quot; 
  value=&quot;&quot; /&gt;</font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial"></font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;/field-constraint&gt;</font></strong></font>
</font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial"></font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;/or-constraint-connective&gt;</font></strong>
</font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial"></font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;/pattern&gt;</font></strong></font></font>
</p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial"></font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;/lhs&gt;&lt;rhs&gt; 
  response.setStatus(&quot;For RFQ Bean: The value of m_rfqId is 
  null.&quot;);</font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">System.out.println(response.getStatus());</font>
</strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p align="left"><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;/rhs&gt;</font></strong></font></font></p>

<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p><font color="#000000" face="Arial" size="2"><font size="2"><strong><font face="Arial">&lt;/rule&gt;</font></strong></font></font></p>
<font color="#000000" face="Arial" size="2"><font size="2">  </font></font><p><font color="#000000" face="Arial" size="2"><font size="2"><font face="Arial">When i tried with this .xml format then i got the follwing 
  error:</font></font></font></p><font color="#000000" face="Arial" size="2"><font size="2"><u><font color="#000080" size="2">
  <p align="left">org.drools.compiler.DroolsParserException</p></font></u></font><font color="#ff0000" size="2">: </font><u><font color="#000080" size="2">org.xml.sax.SAXParseException</font></u></font></div></div><font color="#ff0000" size="2">

  &lt;literal-restriction&gt; requires an &#39;value&#39; attribute
  <p align="left">at 
  org.drools.compiler.PackageBuilder.addPackageFromXml(</p></font><u><font color="#000080" size="2">PackageBuilder.java:177</font></u><font color="#ff0000" size="2">)
  <p align="left">at com.wipro.rfq.report.bean.Validator.readRule(</p></font><u><font color="#000080" size="2">Validator.java:90</font></u><font color="#ff0000" size="2">)
  <p>at com.wipro.rfq.report.bean.Validator.main(</p></font><u><font color="#000080" size="2">Validator.java:47</font></u><font color="#ff0000" size="2">)</font>
  <p><font color="#ff0000" size="2"><font color="#000000" face="Arial">Now please tell 
  me that how can i achieve my requirement?</font></font></p>
  <p><font color="#ff0000" size="2"><font color="#000000" face="Arial">Have a great 
  day.</font></font></p></div>
  <div dir="ltr"><font color="#000000" face="Arial" size="2"></font>&nbsp;</div></div>
  <div dir="ltr">
  <div><font face="Arial"><em><strong>With Regards</strong></em></font></div>
  <div><font face="Arial"><em><strong>Prateek </strong></em></font><font face="Arial"><em><strong></strong></em></font></div></div></blockquote></div>
  <div dir="ltr"><font color="#000000" face="Arial" size="2"></font>&nbsp;</div>
  <div dir="ltr">&nbsp;</div>
  <table>
    <tbody>
    <tr>
      <td bgcolor="#ffffff"><font color="#000000"><br>The information contained in 
        this electronic message and any attachments to this message are intended 
        for the exclusive use of the addressee(s) and may contain proprietary, 
        confidential or privileged information. If you are not the intended 
        recipient, you should not disseminate, distribute or copy this e-mail. 
        Please notify the sender immediately and destroy all copies of this 
        message and any attachments. <br><br>WARNING: Computer viruses can be 
        transmitted via email. The recipient should check this email and any 
        attachments for the presence of viruses. The company accepts no 
        liability for any damage caused by any virus transmitted by this 
        email.<br><br><a href="http://www.wipro.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.wipro.com</a><br></font></td></tr></tbody></table>
<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><br clear="all"></blockquote></div><br><br clear="all"><br>-- <br>Fernando Meyer <a href="http://fmeyer.org">http://fmeyer.org</a><br>JBoss Rules Core Developer
<br><a href="mailto:fmcamargo@gmail.com">fmcamargo@gmail.com</a>