add log when no candidate rules are found

pull/130/merge
Mahmoud Ben Hassine 7 years ago
parent e7d3705320
commit 2e76b0b776

@ -88,7 +88,11 @@ public final class InferenceRulesEngine implements RulesEngine {
do { do {
LOGGER.info("Selecting candidate rules based on the following {}", facts); LOGGER.info("Selecting candidate rules based on the following {}", facts);
selectedRules = selectCandidates(rules, facts); selectedRules = selectCandidates(rules, facts);
if(!selectedRules.isEmpty()) {
delegate.apply(new Rules(selectedRules), facts); delegate.apply(new Rules(selectedRules), facts);
} else {
LOGGER.info("No candidate rules found for {}", facts);
}
} while (!selectedRules.isEmpty()); } while (!selectedRules.isEmpty());
} }

Loading…
Cancel
Save