private List < DTDecisionRule > findMatches ( EvaluationContext ctx , Object [ ] params ) { List < DTDecisionRule > matchingDecisionRules = new ArrayList <> ( ) ; for ( DTDecisionRule decisionRule : decisionRules ) { if ( matches ( ctx , params , decisionRule ) ) { matchingDecisionRules . add ( decisionRule ) ; } } ctx . notifyEvt ( ( ) -> { List < Integer > matches = matchingDecisionRules . stream ( ) . map ( dr -> dr . getIndex ( ) + 1 ) . collect ( Collectors . toList ( ) ) ; return new DecisionTableRulesMatchedEvent ( FEELEvent . Severity . INFO , "Rules matched for decision table '" + getName ( ) + "': " + matches . toString ( ) , getName ( ) , getName ( ) , matches ) ; } ) ; return matchingDecisionRules ; }
Finds all rules that match a given set of parameters