Hi,<br><br>I assume you mean Drools DRL (DSL is something different and none of your examples suggest use of this so far).<br><br>How about checking for the absence of the Double instead of it being null:-<br><br>
when<br>
    $product : Product( )<br>
    not Double( ) from bookingService.getQty( $product )<br>
<br>I&#39;ve not tried it personally.<br><br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">On 15 August 2012 19:54, Hendy Irawan <span dir="ltr">&lt;<a href="mailto:hendy@soluvas.com" target="_blank">hendy@soluvas.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you.<br>
<br>
&quot;this == null&quot; is weird indeed in Java, but I honestly don&#39;t know how to<br>
express this expression in Drools DSL.<br>
<br>
A more realistic rule would be:<br>
<br>
when<br>
    $product : Product( )<br>
    Double( this == null ) from bookingService.getQty( $product )<br>
<br>
So what I want to do is detect when a method call returns null. The method<br>
call can contain parameters but it can be a simple method like before.<br>
<br>
How to do this?<br>
<br>
Thank you.<br>
<br>
Hendy<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/How-to-check-if-a-property-IS-null-tp4019014p4019155.html" target="_blank">http://drools.46999.n3.nabble.com/How-to-check-if-a-property-IS-null-tp4019014p4019155.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>