<?xml version="1.0" encoding="UTF-8"?>
<package name="rules"
xmlns="http://drools.org/drools-4.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-4.0 drools-4.0.xsd">
<import name="com.wipro.rfq.report.bean.Validator.RFQBean" />
<import name="java.util.regex.Pattern" />
<global identifier="bean" type="com.wipro.rfq.report.bean.Validator.RFQBean" />
<rule name="Check_NotNullof_rfqId"> <!--start of rule 1-->
<lhs>
<pattern identifier="bean" object-type="RFQBean" >
<field-constraint field-name="m_rfqId">
<literal-restriction evaluator="==" value="null" />
</field-constraint>
</pattern>
</lhs>
<rhs>
System.out.println("The value of m_rfqId is null");
</rhs>
</rule> <!--end of rule 1-->
<rule name="Check_NotNullof_partId">
<lhs>
<pattern identifier="bean" object-type="RFQBean" >
<field-constraint field-name="m_partId">
<literal-restriction evaluator="==" value="null" />
</field-constraint>
</pattern>
</lhs>
<rhs>
System.out.println("The value of m_partId is null");
</rhs>
</rule>
<rule name="Check_NotNullof_product">
<lhs>
<pattern identifier="bean" object-type="RFQBean" >
<field-constraint field-name="m_product">
<literal-restriction evaluator="==" value="null" />
</field-constraint>
</pattern>
</lhs>
<rhs>
System.out.println("The value of m_product is null");
</rhs>
</rule>
<rule name="Check_NotNullof_country">
<lhs>
<pattern identifier="bean" object-type="RFQBean" >
<field-constraint field-name="m_country">
<literal-restriction evaluator="==" value="null" />
</field-constraint>
</pattern>
</lhs>
<rhs>
System.out.println("The value of m_country is null");
</rhs>
</rule>
<rule name="Check_NotNullof_lotSize">
<lhs>
<pattern identifier="bean" object-type="RFQBean" >
<field-constraint field-name="m_lotSize">
<literal-restriction evaluator="==" value="null" />
</field-constraint>
</pattern>
</lhs>
<rhs>
System.out.println("The value of m_lotSize is null");
</rhs>
</rule>
<rule name="Check_NotNullof_mtrlType">
<lhs>
<pattern identifier="bean" object-type="RFQBean" >
<field-constraint field-name="m_mtrlType">
<literal-restriction evaluator="==" value="null" />
</field-constraint>
</pattern>
</lhs>
<rhs>
System.out.println("The value of m_mtrlType is null");
</rhs>
</rule>
<rule name="Check_NotNullof_fsUMC">
<lhs>
<pattern identifier="bean" object-type="RFQBean" >
<field-constraint field-name="m_fsUMC">
<literal-restriction evaluator="==" value="null" />
</field-constraint>
</pattern>
</lhs>
<rhs>
System.out.println("The value of m_fsUMC is null");
</rhs>
</rule>
<rule name="Check_NotNullof_deadLine">
<lhs>
<pattern identifier="bean" object-type="RFQBean" >
<field-constraint field-name="m_deadLine">
<literal-restriction evaluator="==" value="null" />
</field-constraint>
</pattern>
</lhs>
<rhs>
System.out.println("The value of m_deadLine is null");
</rhs>
</rule>
<rule name="Check_NotNullof_Date">
<lhs>
<pattern identifier="bean" object-type="RFQBean" >
<field-constraint field-name="m_dueDate">
<literal-restriction evaluator="==" value="null" />
</field-constraint>
</pattern>
</lhs>
<rhs>
System.out.println("The value of m_dueDate is null");
</rhs>
</rule>
<rule name="temp">
<lhs>
<eval>bean.getM_dueDate().trim().equals("24/10/2007")</eval>
</lhs>
<rhs>
System.out.println("The entered date is "+bean.getM_dueDate());
</rhs>
</rule>
</package>
Now i want to know that how can i use a method of "RFQBean" class inside the <lhs></lhs> and <rhs></rhs>tag
And please mail me the description of all the tags that i can use in a rule based .xml file.
Also how can i know that whether a particular rule has been fired or not.