From: prateek.katiyar@wipro.com [mailto:prateek.katiyar@wipro.com]
Sent: 04 October 2007 07:42
To: Anstis, Michael (M.)
Subject: About Quotes in Xml fileHiThanks for your reply.I have a field "m_rfqId" in one of my JavaBean "RFQBean" and i want to implement a rule on this field asrule "Check_NotNullof_rfqId"agenda-group "Check"
when
RFQBean((m_rfqId == null)||(m_rfqId == ""))
then
response.setStatus("For RFQ Bean: The value of m_rfqId is null.");
System.out.println(response.getStatus());
end
Now when i used XmlDumper for the .xml format of this rule then i got the following syntax:
<rule name="Check_NotNullof_rfqId">
<rule-attribute name="agenda-group" value="Check" />
<lhs><pattern object-type="RFQBean" >
<or-constraint-connective><field-constraint field-name="m_rfqId">
<literal-restriction evaluator="==" value="null" />
</field-constraint>
<field-constraint field-name="m_rfqId">
<literal-restriction evaluator="==" value="" />
</field-constraint>
</or-constraint-connective>
</pattern>
</lhs><rhs> response.setStatus("For RFQ Bean: The value of m_rfqId is null.");
System.out.println(response.getStatus());
</rhs>
</rule>
When i tried with this .xml format then i got the follwing error:
org.drools.compiler.DroolsParserException
: org.xml.sax.SAXParseException: <literal-restriction> requires an 'value' attributeat org.drools.compiler.PackageBuilder.addPackageFromXml(
PackageBuilder.java:177)at com.wipro.rfq.report.bean.Validator.readRule(
Validator.java:90)at com.wipro.rfq.report.bean.Validator.main(
Validator.java:47)Now please tell me that how can i achieve my requirement?
Have a great day.
With RegardsPrateek
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.
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.
www.wipro.com