<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=ltr><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=045364107-04102007><FONT face=Arial 
color=#0000ff size=2>Forwarded to user group under condition "#4. Send emails 
directly to mailing list members, especially the developers" of the forum 
guidelines.</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> prateek.katiyar@wipro.com 
  [mailto:prateek.katiyar@wipro.com] <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 id=idOWAReplyText15354 dir=ltr>
  <DIV dir=ltr><FONT face=Arial color=#000000 size=2>
  <DIV id=idOWAReplyText15736 dir=ltr>
  <DIV dir=ltr><FONT face=Arial color=#000000 size=2>Hi</FONT></DIV>
  <DIV dir=ltr><FONT face=Arial size=2>Thanks for your reply.</FONT></DIV>
  <DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV dir=ltr><FONT face=Arial size=2>I have a field "<STRONG>m_rfqId</STRONG>" 
  in one of my JavaBean "<STRONG>RFQBean</STRONG>"&nbsp;and i want to implement 
  a rule on this field as </FONT></DIV>
  <DIV dir=ltr><FONT size=2><FONT face=Arial></FONT></FONT>&nbsp;</DIV>
  <DIV dir=ltr><FONT size=2><FONT face=Arial><STRONG>rule 
  "Check_NotNullof_rfqId"</STRONG></FONT></DIV>
  <DIV dir=ltr>
  <P align=left><FONT face=Arial><STRONG>agenda-group 
"Check"</STRONG></FONT></P>
  <P align=left><FONT face=Arial><STRONG>when</STRONG></FONT></P>
  <P align=left><FONT face=Arial><STRONG>RFQBean((m_rfqId == null)||(m_rfqId == 
  ""))</STRONG></FONT></P>
  <P align=left><FONT face=Arial><STRONG>then</STRONG></FONT></P>
  <P align=left><FONT face=Arial><STRONG>response.setStatus("For RFQ Bean: The 
  value of m_rfqId is null.");</STRONG></FONT></P>
  <P align=left><FONT 
  face=Arial><STRONG>System.out.println(response.getStatus());</STRONG></FONT></P>
  <P align=left><FONT face=Arial><STRONG>end</STRONG></FONT></P>
  <P align=left><FONT face=Arial>Now when i used XmlDumper for the .xml format 
  of this rule then i got the following syntax:</FONT></P><FONT size=2>
  <P align=left><STRONG><FONT face=Arial>&lt;rule 
  name="Check_NotNullof_rfqId"&gt;</FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial>&lt;rule-attribute name="agenda-group" 
  value="Check" /&gt;</FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial></FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial>&lt;lhs&gt;&lt;pattern 
  object-type="RFQBean" &gt;</FONT></STRONG></P>
  <P align=left><STRONG><FONT 
  face=Arial>&lt;or-constraint-connective&gt;&lt;field-constraint 
  field-name="m_rfqId"&gt; </FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial>&lt;literal-restriction evaluator="==" 
  value="null" /&gt;</FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial></FONT></STRONG></P>
  <P align=left><STRONG><FONT 
  face=Arial>&lt;/field-constraint&gt;</FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial>&lt;field-constraint 
  field-name="m_rfqId"&gt; </FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial>&lt;literal-restriction evaluator="==" 
  value="" /&gt;</FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial></FONT></STRONG></P>
  <P align=left><STRONG><FONT 
  face=Arial>&lt;/field-constraint&gt;</FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial></FONT></STRONG></P>
  <P align=left><STRONG><FONT 
  face=Arial>&lt;/or-constraint-connective&gt;</FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial></FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial>&lt;/pattern&gt;</FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial></FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial>&lt;/lhs&gt;&lt;rhs&gt; 
  response.setStatus("For RFQ Bean: The value of m_rfqId is 
  null.");</FONT></STRONG></P>
  <P align=left><STRONG><FONT 
  face=Arial>System.out.println(response.getStatus());</FONT></STRONG></P>
  <P align=left><STRONG><FONT face=Arial>&lt;/rhs&gt;</FONT></STRONG></P>
  <P><STRONG><FONT face=Arial>&lt;/rule&gt;</FONT></STRONG></P>
  <P><FONT face=Arial>When i tried with this .xml format then i got the follwing 
  error:</FONT></P><U><FONT color=#000080 size=2>
  <P align=left>org.drools.compiler.DroolsParserException</U></FONT><FONT 
  color=#ff0000 size=2>: </FONT><U><FONT color=#000080 
  size=2>org.xml.sax.SAXParseException</U></FONT><FONT color=#ff0000 size=2>: 
  &lt;literal-restriction&gt; requires an 'value' attribute</P>
  <P align=left>at 
  org.drools.compiler.PackageBuilder.addPackageFromXml(</FONT><U><FONT 
  color=#000080 size=2>PackageBuilder.java:177</U></FONT><FONT color=#ff0000 
  size=2>)</P>
  <P align=left>at com.wipro.rfq.report.bean.Validator.readRule(</FONT><U><FONT 
  color=#000080 size=2>Validator.java:90</U></FONT><FONT color=#ff0000 
  size=2>)</P>
  <P>at com.wipro.rfq.report.bean.Validator.main(</FONT><U><FONT color=#000080 
  size=2>Validator.java:47</U></FONT><FONT color=#ff0000 size=2>)</FONT></P>
  <P><FONT color=#ff0000 size=2><FONT face=Arial color=#000000>Now please tell 
  me that how can i achieve my requirement?</FONT></FONT></P>
  <P><FONT color=#ff0000 size=2><FONT face=Arial color=#000000>Have a great 
  day.</FONT></P></FONT></FONT></FONT></DIV>
  <DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV></DIV>
  <DIV id=idSignature1558 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></FONT></DIV>
  <DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV></DIV>
  <DIV id=idSignature61487 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>www.wipro.com<BR></FONT></TD></TR></TBODY></TABLE></BLOCKQUOTE></BODY></HTML>