Hi,
Definatelly it's a bug in the literalrestrictionhandler,
http://jira.jboss.org/jira/browse/JBRULES-1248 and it's already available
in the 4.0.2-snapshot
Regards
On 10/4/07, Anstis, Michael (M.) <manstis1(a)ford.com> wrote:
Forwarded to user group under condition "#4. Send emails directly to
mailing list members, especially the developers" of the forum guidelines.
------------------------------
*From:* prateek.katiyar(a)wipro.com [mailto:prateek.katiyar@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
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Fernando Meyer
http://fmeyer.org
JBoss Rules Core Developer
fmcamargo(a)gmail.com