use of org.kie.dmn.feel.runtime.events.DecisionTableRulesSelectedEvent in project drools by kiegroup.
the class DMNDTExpressionEvaluator method processEvents.
private EventResults processEvents(List<FEELEvent> events, DMNRuntimeEventManager eventManager, DMNResultImpl result) {
EventResults r = new EventResults();
for (FEELEvent e : events) {
if (e instanceof DecisionTableRulesMatchedEvent) {
r.matchedRules = ((DecisionTableRulesMatchedEvent) e).getMatches();
} else if (e instanceof DecisionTableRulesSelectedEvent) {
r.fired = ((DecisionTableRulesSelectedEvent) e).getFired();
} else if (e.getSeverity() == FEELEvent.Severity.ERROR) {
MsgUtil.reportMessage(logger, DMNMessage.Severity.ERROR, ((DMNBaseNode) node).getSource(), result, null, e, Msg.FEEL_ERROR, e.getMessage());
r.hasErrors = true;
} else if (e.getSeverity() == FEELEvent.Severity.WARN) {
MsgUtil.reportMessage(logger, DMNMessage.Severity.WARN, ((DMNBaseNode) node).getSource(), result, null, e, Msg.FEEL_WARN, e.getMessage());
}
}
events.clear();
return r;
}
Aggregations