[rules-users] question about 'from'

Mark Proctor mproctor at codehaus.org
Mon Mar 12 19:07:52 EDT 2007


'from' uses MVEL for its expressions, so for Qs like that consult the 
MVEL guide, also you can do jira requests for features like that.

Mark
Sam wrote:
> When using the new 'from' feature, does Drools handle null values correctly? 
> For example, let's say I have a rule like this:
>
> rule check
>   when
>     Integer() from helper.getId();
>   then
>     ...
> end
>
> I tried returning null from getId(), but it caused Drools to throw an exception.
>  So what I'm currently doing is have getId() return a collection, which may be
> empty.  In this case Drools handles it without problem.  Is there a better way
> to do this?  I just don't want to wrap everything in a collection.
>
> thanks.
>
> sam
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>   




More information about the rules-users mailing list