[rules-users] FW: About Quotes in Xml file
Anstis, Michael (M.)
manstis1 at ford.com
Thu Oct 4 03:42:09 EDT 2007
Forwarded to user group under condition "#4. Send emails directly to mailing
list members, especially the developers" of the forum guidelines.
_____
From: prateek.katiyar at wipro.com [mailto:prateek.katiyar at wipro.com]
Sent: 04 October 2007 07:42
To: Anstis, Michael (M.)
Subject: About Quotes in Xml file
Hi
Thanks 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 as
rule "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' attribute
at
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 Regards
Prateek
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071004/baae00a1/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4159 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20071004/baae00a1/attachment.bin
More information about the rules-users
mailing list