Re: [rules-users] NullPointerException with Wrapper objects

2009-05-14 Thread Wolfgang Laun
-users] NullPointerException with Wrapper objects To: rules-users@lists.jboss.org Well, like Wolfgang said, good luck with that. :) The only rules engine I know that does this is Tibco BusinessEvents, and it's accomplished by making a copy of your objects before inserting them into working

Re: [rules-users] NullPointerException with Wrapper objects

2009-05-14 Thread Shannon Lal
unacceptable for checking null for the same attribute in around 50 rules. Shannon, can you please elaborate more about your solution or if possible post some simple code?** Date: Wed, 13 May 2009 08:28:53 -0700 From: greg_bar...@yahoo.com Subject: RE: [rules-users] NullPointerException with Wrapper

Re: [rules-users] NullPointerException with Wrapper objects

2009-05-13 Thread Greg Barton
All conditions of all applicable rules are evaluated when you insert an object into working memory. This decides which rule actions can go on the agenda. Only when a rule action is on the agenda is the salience used to determine the order of action firing. So doing the null check in the way

RE: [rules-users] NullPointerException with Wrapper objects

2009-05-13 Thread Shabbir Dhari
From: greg_bar...@yahoo.com Subject: Re: [rules-users] NullPointerException with Wrapper objects To: rules-users@lists.jboss.org All conditions of all applicable rules are evaluated when you insert an object into working memory. This decides which rule actions can go on the agenda

Re: [rules-users] NullPointerException with Wrapper objects

2009-05-13 Thread Wolfgang Laun
attribute. There are more than 30 attributes in the bean and using them in LHS. Any other sophisticated way? Date: Tue, 12 May 2009 23:15:54 -0700 From: greg_bar...@yahoo.com Subject: Re: [rules-users] NullPointerException with Wrapper objects To: rules-users@lists.jboss.org All

RE: [rules-users] NullPointerException with Wrapper objects

2009-05-13 Thread Shabbir Dhari
but it performs some calculations. Date: Wed, 13 May 2009 09:01:05 +0200 Subject: Re: [rules-users] NullPointerException with Wrapper objects From: wolfgang.l...@gmail.com To: rules-users@lists.jboss.org What about setting the field to 0 in the constructor of Salary? Or using float

Re: [rules-users] NullPointerException with Wrapper objects

2009-05-13 Thread Wolfgang Laun
. -- Date: Wed, 13 May 2009 09:01:05 +0200 Subject: Re: [rules-users] NullPointerException with Wrapper objects From: wolfgang.l...@gmail.com To: rules-users@lists.jboss.org What about setting the field to 0 in the constructor of Salary? Or using float (not java.lang.Float)? -W

Re: [rules-users] NullPointerException with Wrapper objects

2009-05-13 Thread Wolfgang Laun
. -- Date: Wed, 13 May 2009 10:36:59 +0200 Subject: Re: [rules-users] NullPointerException with Wrapper objects From: wolfgang.l...@gmail.com To: rules-users@lists.jboss.org But you do control the insertion of your facts. Rather than cluttering rules with conditions dealing with irregular values

RE: [rules-users] NullPointerException with Wrapper objects

2009-05-13 Thread Shabbir Dhari
Thanks for all you efforts :) but what is the difference between calling function from every rule or putting null check. I give up. I am looking for other rule engines. Date: Wed, 13 May 2009 12:19:08 +0200 Subject: Re: [rules-users] NullPointerException with Wrapper objects From

Re: [rules-users] NullPointerException with Wrapper objects

2009-05-13 Thread Wolfgang Laun
) be Java-based, I'd be very much surprised if you'll find what you are looking for. -W -- Date: Wed, 13 May 2009 12:19:08 +0200 Subject: Re: [rules-users] NullPointerException with Wrapper objects From: wolfgang.l...@gmail.com To: rules-users@lists.jboss.org Well

Re: [rules-users] NullPointerException with Wrapper objects

2009-05-13 Thread Shannon Lal
I am no expert on drools; however, you might want to retract loanDeduction from the Working Memory if it is null. Your first rule determines that it is null and then you set the value (ld = 0f); however, you should be using an insert to put this into working memory. The other alternative is to

RE: [rules-users] NullPointerException with Wrapper objects

2009-05-13 Thread Greg Barton
: From: Shabbir Dhari sdh...@hotmail.com Subject: RE: [rules-users] NullPointerException with Wrapper objects To: rules-users@lists.jboss.org Date: Wednesday, May 13, 2009, 5:44 AM Thanks for all you efforts :) but what is the difference between calling function from every rule or putting

RE: [rules-users] NullPointerException with Wrapper objects

2009-05-13 Thread Shabbir Dhari
your solution or if possible post some simple code? Date: Wed, 13 May 2009 08:28:53 -0700 From: greg_bar...@yahoo.com Subject: RE: [rules-users] NullPointerException with Wrapper objects To: rules-users@lists.jboss.org Well, like Wolfgang said, good luck with that. :) The only rules