[rules-users] How execute a Single rule from rule file or rule package

Wolfgang Laun wolfgang.laun at gmail.com
Sun Jul 5 13:57:04 EDT 2009


The concept of "executing a rule" isn't useful. Rules are written to fire
whenever their conditions are met by some set of facts. So, if all of your
rules fire, then all conditions are met.

Consider the condition defining the single rule you want to fire. Can this
condition be derived from one or more fields in your facts? If so, add these
conditions to the rule and the complementary condition to all other rules.
If not, you may have to add yet another fact containing that data, so that
you can proceed likewise, using the added fact.

OTOH, it might be possible that a rule-based system isn't well suited for
what you want to do.

-W


On 7/3/09, Amila Silva <amilac at hsenidmobile.com> wrote:
>
> hi everyone,
>
>   I have a requirement like execute a single rule from set of loaded rule
> files or single rule from single drl file.
>  when i execute fireAllRules() it executes the all the rules in the files.
> even that overloaded method that take int as agrs also
>  seems doesnt help much.
>  let me know if any body gone thru this kind of senarios.
>
>
>
>
>
> --
> Thanks,
> Regrads,
>
> Amila Silva,
> Associate Software Engineer
>
> hSenid Mobile Solutions
>
> Phone :
> +94-77-9983894
> Fax     :
> +94-11-2673 845
>
> Web:
> http://www.hSenid.com <http://www.hsenid.com/>
>
> Make it Happen
>
>
> http://www.hSenidMobile.com <http://www.hsenidmobile.com/>
>
> Enabling the Mobile World
>
>
> Disclaimer: This email and any files transmitted with it are confidential
> and intended solely for the use of the individual or entity to which they
> are addressed. The content and opinions contained in this email are not
> necessarily those of hSenid Software International. If you have received
> this email in error please contact the sender.
>
>
> _______________________________________________
> 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/20090705/02db9162/attachment.html 


More information about the rules-users mailing list