[rules-users] execute particular rules programmatically and dynamically

Wolfgang Laun wolfgang.laun at gmail.com
Thu Mar 31 03:30:42 EDT 2011


On 31 March 2011 07:58, Benson Fung <benson.redhat at gmail.com> wrote:

> Hi,
>
> If there are 10 rules in the drools rulebase, and right now I would
> like to execute one of the particular rule.  Is there any approach/way
> to execute particular rule programmatically?


No. The right hand side of a rule (code between "then" and "end") is
executed whenever there is a set of fact objects in Working Memory
satisfying the condition. If you insert such a set of facts and call
fireAllRules(), then it will happen.



>  I don't think
> agenda-group or activation-group can do that, right?  Or is it
> possible to create an agenda programmatically ?
>

No to both.
-W


>
> Thanks
> _______________________________________________
> 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/20110331/ab558d4c/attachment.html 


More information about the rules-users mailing list