[rules-users] Guvnor rule with a not and an ==

Michael Anstis michael.anstis at gmail.com
Fri Apr 29 18:26:07 EDT 2011


I don't believe it is possible to negate rules in Guvnor using the guided
editor. Please raise a JIRA for an enhancement.

AFAIK the only work around would be to specify "Free form DRL" when
constructing the pattern.

With kind regards,

Mike

On 29 April 2011 21:46, Dean Whisnant <dean at basys.com> wrote:

>
> Hi,
>
> I have a rule where I want to check if an object doesn't exist or it exists
> and a field in it is null or a field in it is D.
>
> Here's .drl code that works
>
> rule "test does not exist is null or is D"
>        when
>                (not CLM_DET_LOAD_PendCode() ||
>                         CLM_DET_LOAD_PendCode(pendCode_29== (null)) ||
>                        CLM_DET_LOAD_PendCode(pendCode_29== "D")
>                )
>        then
>                System.out.println("CLM_DET_LOAD_PENDCOE does not exist, is
> null, or is D");
> End
>
> Normally in Guvnor to do an Or, I choose "Any of the following are true..."
> from the 'Add a condition to the rule...' dialogue.  But when I choose this
> and then try to do the "not" logic, there is no choice for 'not'.  I can get
> the other two conditions in just fine.  Short of putting freeform DRL
> language in there, do you have any suggestions?  Am I missing an option in
> guvnor?
>
> Thanks
>
> Dean
>
> _______________________________________________
> 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/20110429/d7e2939b/attachment.html 


More information about the rules-users mailing list