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

Mark Proctor mproctor at codehaus.org
Thu Jan 17 15:44:32 EST 2008


prateek.katiyar at wipro.com wrote:
> 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_notvalid");*
> *              *</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.
>
Use the DrlDumper to get a DRL view  of your rules, to help make them 
easer to understand, and then debug them as normal in the Eclipse IDE 
using the agenda and audit views.
>  
> 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
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080117/f8f66c98/attachment.html 


More information about the rules-users mailing list