Jagpreet,

Not sure, but maybe you could use an Object insted of String type for
your parameter.

Friday, November 4, 2005, 11:06:06 AM, you wrote:

> Not able to check for null condition
> ------------------------------------

>          Key: DROOLS-427
>          URL: http://jira.codehaus.org/browse/DROOLS-427
>      Project: drools
>         Type: Bug
>     Versions: 2.1    
>  Environment: WINXP & Java
>     Reporter: Jagpreet Kaur
>  Assigned to: bob mcwhirter 


> I am using JSR94 and drools.

> My rule.xml file looks :

> <rule-set name="PunchRoundingAndDockingRule"
> xmlns="http://drools.org/rules";
> xmlns:java="http://drools.org/semantics/java";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://drools.org/rules rules.xsd
> http://drools.org/semantics/java java.xsd">

>         <import>java.lang.Object</import>
>         <import>java.lang.String</import>
        
>         <!--Rule to check that department is Null-->
>         <rule name="Checkdepartmentfornull">
>                  <parameter identifier="department">
>                 <class>String</class>
>                 </parameter>

>                <java:condition>
>                                            department==null
>                </java:condition>
                
>                <java:consequence>
>                         System.out.println("department is null"); 
>               </java:consequence>
>                     </rule>
>                    </rule-set>

> I am passing department as null but the following condition is
> never check and I am not getting any exceptions but
> also not getting the "department is null" message on the console. How can I 
> check for null
> condition?




--------------------------
Felipe Piccolini
[EMAIL PROTECTED]

Reply via email to