[rules-users] How to write rules that can skip checking some constraint (i.e. "or" inside the rule)
Greg Barton
greg_barton at yahoo.com
Fri Jan 16 10:48:10 EST 2009
There is an 'or' in 4.
http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html_single/index.html#d0e3739
--- On Fri, 1/16/09, Maxim Veksler <maxim.veksler at gmail.com> wrote:
> From: Maxim Veksler <maxim.veksler at gmail.com>
> Subject: [rules-users] How to write rules that can skip checking some constraint (i.e. "or" inside the rule)
> To: "Rules Users List" <rules-users at lists.jboss.org>
> Date: Friday, January 16, 2009, 8:12 AM
> Hello List,
>
> I'm trying to express a list of channels the subscriber
> is allowed to
> access, this splits into 2 possible flows :
> 1. Subscriber has X>0 in $enabledChannels, allow passing
> only for
> these channels.
> 2. Subscriber has "null" in the $enabledChannels
> - In that case
> continue because this check is not required.
>
> I'm trying to express this in the constraint node in
> like this, which
> does not work
>
> $subscriber : DynaSubscriber(
> adsEnabled == true,
> $optoutStr : optoutStr,
>
> enabledChannels contains $channelId // Make sure
> subscriber is
> "service registered" for this channel.
> /*PROBLEM::::*/ or enabledChannels == null
> )
>
>
> I would like to be able to say, If enabledChannels is
> marked (In any
> way you would suggest) as "empty" don't check
> this constraint node.
>
> How can I do this?
> I'm using Drools3, but if feasible solution is
> presented in the form
> of Drools4, 5 please kindly let me know this information.
>
>
> Thank you,
> Maxim.
> --
> Cheers,
> Maxim Veksler
>
> "Free as in Freedom" - Do u GNU ?
> _______________________________________________
> 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