[rules-users] <pattern /> tag is not working in rule file

prateek.katiyar at wipro.com prateek.katiyar at wipro.com
Thu Jan 17 03:43:25 EST 2008


Hello all
 
I am using Drools 4.0.3
I am using a .xml rule file in my application in which I am validating
the user entered data through my rule file.
When I am not using <pattern /> tag in my rule file then it is working
fine but when I use it ,the rules are not firing even it is not showing
any exception also.
For your reference I am coping my rule file below :
 
<?xml version="1.0" encoding="UTF-8" ?> 
    <package xmlns="http://drools.org/drools-4.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" name="jbossrules"
xs:schemaLocation="http://drools.org/drools-4.0 drools-4.0.xsd">
      <import name="com.wipro.evalidator.response.bean.ResponseBean" /> 
      <global identifier="response"
type="com.wipro.evalidator.response.bean.ResponseBean" /> 
      <import name="java.lang.*" /> 
      <import name="com.wipro.airline.SearchBean" /> 
     <rule name="rule1">
              <rule-attribute name="agenda-group" value="AirlineApp" /> 
              <rule-attribute name="activation-group"
value="activation_1195126928297" /> 
              <lhs>
                  <pattern identifier="searchbean"
object-type="com.wipro.airline.SearchBean" /> 
                  <eval>true</eval> 
         </lhs>
             <rhs>
                    System.out.println("date is not
valid.");response.setStatus("failure");response.setSubStatus("date_notva
lid");
              </rhs> 
  </rule>
</package>
 
 
If <pattern /> tag is not allowed here then how can we use SearchBean
fields in the lhs part of the rule.
Any help will be appreciated.
 
 
Regards
Prateek Katiyar
 

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/20080117/b3b751c7/attachment.html 


More information about the rules-users mailing list