[rules-users] to have some hierarchical control over rules in the same package

Leonardo Figueiredo leo.lists at gmail.com
Wed Oct 1 11:34:56 EDT 2008


Hi,

Why dont you build an RuleBase for each package and runs it when and where
needed? Or add an remove the packages from RuleBase as needed?

ruleBase.addPackage( pkg );  // Add a package instance
ruleBase.removePackage( "org.com.sample" );  // remove a package, and
all its parts, by it's namespace


Is it what you want to do?

Regards,
Leo

On Mon, Sep 29, 2008 at 7:18 PM, hongyu lu <hl_107 at yahoo.com> wrote:

> Hi,
>
> I have a use case where I would like to group rules by package(each package
> would be one experiment in my app). There are a couple attributes at the
> package level, which will enable/disable all rules of that package(not being
> fired). What would be the best way to achieve this? I am new to Drools and
> it looks like the rule definition is kinda flat. I would like to avoid
> defining package level conditions within each rule.
>
> thanks
> Jeff
>
>
>
>
> _______________________________________________
> 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/20081001/2ca2311b/attachment.html 


More information about the rules-users mailing list