On Wed, Jun 18, 2008 at 10:29 AM, Jaroslaw Kijanowski
<kijanowski(a)gmail.com> wrote:
May be you could store the names of every fired rule in a global by
putting
drools.getRule().getName() into a list on the RHS.
Then you could get all rules in your package ( pkg.getRules() ) into another
list and "diff" both collections (another_list.removeAll(list) ).
Thalupula Ravi wrote:
>
> Hi,
> How can i log that where a rule is executed or not for supplied data? If
> the
> rule fires, in 'then' section i can have a log statement.
> How can i log that the rule is not executed??
>
> I need to log in both scenarios.
>
> Thanks,
> Ravi Thalupula
Hi Ravi,
have you looked at the logging facilities included in Drools,
especially AgendaEventListener? That way you wouldn't have to manually
log activations in the RHS of every rule. Diffing the the names of
available rules versus those collected by the logging seems to me the
most straightforward solution, too.
Best regards
Marcus