[rules-users] Problem when I cleaning the production memory.

Davide Sottara dsotty at gmail.com
Wed Jul 16 04:54:44 EDT 2014


Not checking for nulls is a debatable behavior :)
In 5.6 you should be able to use the null safe accessor
Business activity.!status == ...
Which will be rewritten to do the check for you
On Jul 16, 2014 4:33 AM, "braveheart85" <andrea.pacifico.85 at gmail.com>
wrote:

> Yesterday I tried version 5.6. I have had a problem with the MVEL syntax.
>
> rule "RULE1"
>   $result: PersonData( businessActivity.status == "CLOSED" )
> end
>
> This rule that works in the version 5.5, now have a problem in version 5.6:
>
> unable to invoke method:
> org.titan.registry.filter.BusinessActivityData.getStatus: target of method
> is null
>
> The problem is that not all Person facts inside the working memory have a
> business activity. NullPointer would be quite correct but in version 5.5
> the
> behaviour was different...
>
> Maybe I'm abusing of your kindness.
> Andrea
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Problem-when-I-cleaning-the-production-memory-tp4030341p4030367.html
> Sent from the Drools: User forum mailing list archive at Nabble.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/20140716/1ef9b747/attachment.html 


More information about the rules-users mailing list