Get Attributes from AfterMatchFiredEvent
Closed this issue · 3 comments
wake-0 commented
Can I get the attributes for a rule which was fired?
E.g. by using the Sink (RuleTerminalNode) from the AfterMatchFiredEvent.
tkobayas commented
For questions, please use google group (https://groups.google.com/g/drools-usage , https://groups.google.com/g/drools-setup) and zulip chat (https://kie.zulipchat.com/#narrow/stream/232677-drools).
You can get org.drools.base.definitions.rule.impl.RuleImpl
from AfterMatchFiredEvent. RuleImpl ruleImpl = (RuleImpl) event.getMatch().getRule();
, then you can access attributes in the RuleImpl. e.g. ruleImpl.getSalience()
.