]
Mario Fusco updated DROOLS-5544:
--------------------------------
Sprint: 2020 Week 31-33 (from Jul 27)
RuleRuntimeEventListener not containing the rule that triggered it
when rules are compiled
------------------------------------------------------------------------------------------
Key: DROOLS-5544
URL:
https://issues.redhat.com/browse/DROOLS-5544
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.31.0.Final
Reporter: Ciprian Chiru
Assignee: Mario Fusco
Priority: Major
When rules are compiled using _kie-maven-compile_, the event handlers implementing
_RuleRuntimeEventListener_ no longer have the rule that triggered them set
(_ObjectInsertedEvent.getRule()_ is null) .
{code:java}
public class MyListener implements RuleFactEventListener {
@Override
public void objectInserted(final ObjectInsertedEvent event) {
System.out.println(event.getRule()); // Throws exception
}
{code}
It only happens when the compiler plugin is invoked. If the rules are used as such, the
event is properly set.