[rules-users] Rule id / Rule name
Michael Anstis
michael.anstis at gmail.com
Thu Oct 7 16:04:49 EDT 2010
If you really need the rule name in the consequence you can also access the
implicit KnowledgeHelper instance "drools":-
rule "test"
when
eval(true)
then
System.out.println("Rule name = " + drools.getRule().getName());
end
2010/10/7 esteban.aliverti at gmail.com <esteban.aliverti at gmail.com>
> That's right Leandro, using an AgendaEventListener is much more elegant!
>
> Best Regards,
>
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> Esteban Aliverti
> - Developer @ http://www.plugtree.com
> - Blog @ http://ilesteban.wordpress.com
>
>
> 2010/10/7 Leandro Romero <leandro.s.romero at gmail.com>
>
>> I am not 100% sure, but in my opinion an elegant way to do it would be to
>> create a class that extends from DefaultAgendaEventListener and then
>> override the "afterActivationFired" method.
>>
>> If you are using that fact in another rule and you want it to be updated,
>> you have to call "update($d)" or you can modify $d inside a modify block.
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
> _______________________________________________
> 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/20101007/dda0f300/attachment.html
More information about the rules-users
mailing list