[rules-users] null checking
samd
sdoyle_2 at yahoo.com
Thu Oct 16 15:03:36 EDT 2008
samd wrote:
>
> How do I evaluate null conditions in the following case for example?
>
> seller: ( seller.cheese != null && seller.active == true )
> cheese: ( cheese.type == "chedder" ) from seller.cheese
>
> In the above example seller.cheese is null but seller is used in the
> second part of the rule since we can't evaluate facts for null for some
> reason how do you check for a null condition.
>
>
should be cheese: ( type == "chedder" ) from seller.cheese
anyways I tried doing this
(
seller: ( seller.cheese != null && seller.active == true )
cheese: ( cheese.type == "chedder" ) from seller.cheese
)
or
(
seller: ( seller.cheese = null && seller.active == true )
)
Which throws an error
I just need the correct syntax I guess heh
--
View this message in context: http://www.nabble.com/null-checking-tp20015953p20016182.html
Sent from the drools - user mailing list archive at Nabble.com.
More information about the rules-users
mailing list