No problem foreseen. The issue was that the "value" was added to the DRL even though the operator "not null" didn't need a value.
Another work around is to first use "equals", then enter a literal value (a single space, or empty string) and then the "not null" operator. Your work around seems simpler though. 2011/9/5 puja nandamuri <[email protected]> > what do you think of using the function route as a work around? > > do you see any issues with using that ? > > > --- On *Mon, 9/5/11, Michael Anstis <[email protected]>* wrote: > > > From: Michael Anstis <[email protected]> > Subject: Re: [rules-users] is null or is not Null failing for a String > field check in Guvnor drl > To: "Rules Users List" <[email protected]> > Date: Monday, September 5, 2011, 1:04 PM > > > Shame :( > > 5.2.0.Final could well be fixed... are you able to try that? CR! was > effectively pre-release. > > 2011/9/5 puja nandamuri > <[email protected]<http://mc/[email protected]> > > > > Michael, > > Thanks. Yes, I am using 5.2.0.CR1.I do not have a choice to move to 5.3 at > this point. > > as an alternate, I am using the following work around. > > to be able to do 'is null' or 'is not null' for checking null condition > on a field, > > I select 'equal to' as the operator and then, I click on the function > button instead of literal value . > > In the text box that comes up, I enter null > > Doing this validates the condition successfully and I am able to run the > test scenario successfully . > similarly, I select 'not equal to' operator for checking is not null > condition and then in the function text box, I enter null. > > > > > > > --- On *Mon, 9/5/11, Michael Anstis > <[email protected]<http://mc/[email protected]> > >* wrote: > > > From: Michael Anstis > <[email protected]<http://mc/[email protected]> > > > Subject: Re: [rules-users] is null or is not Null failing for a String > field check in Guvnor drl > To: "Rules Users List" > <[email protected]<http://mc/[email protected]> > > > Date: Monday, September 5, 2011, 12:13 PM > > > It was a bug but was fixed a while ago. > > I can't recall if it made 5.2 - but it definately doesn't exist in > 5.3.0.CR1 (or master branch as of today - I just checked). > > 2011/9/5 puja nandamuri > <[email protected]<http://mc/[email protected]> > > > > Hi , > > when using a business rule guided editor , > > for a fact, when I select a string type field from the drl guided editor in > Guvnor and select > is null from the dropdown list of operators, > > I get the following validation error when I do a validate on the rule. > > no viable alternative at input 'null' in rule > "Asset_Description_NullCheckRule" > > when I do a View Source, it shows the source as > > when > Asset( description == null null ) > > Is this a bug ? > > if I select the free form drl option and create the when condition as > > Asset( description == null ) , it validates fine. > > Thanks, > > Ram > > _______________________________________________ > rules-users mailing list > [email protected]<http://mc/[email protected]> > https://lists.jboss.org/mailman/listinfo/rules-users > > > > -----Inline Attachment Follows----- > > > _______________________________________________ > rules-users mailing list > [email protected]<http://mc/[email protected]> > https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > [email protected]<http://mc/[email protected]> > https://lists.jboss.org/mailman/listinfo/rules-users > > > > -----Inline Attachment Follows----- > > _______________________________________________ > rules-users mailing list > [email protected]<http://mc/[email protected]> > https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > >
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
