private Either<FEELEvent, Object> actualInputsMatchInputValues(EvaluationContext ctx, Object[] params) {
for( int i = 0; i < params.length; i++ ) {
final DTInputClause input = inputs.get( i );
if ( input.getInputValues() != null && ! input.getInputValues().isEmpty() ) {
final Object parameter = params[i];
boolean satisfies = input.getInputValues().stream().map( ut -> ut.apply( ctx, parameter ) ).filter( Boolean::booleanValue ).findAny().orElse( false );
if ( !satisfies ) {
String values = input.getInputValuesText();
return Either.ofLeft(new InvalidInputEvent( FEELEvent.Severity.ERROR,
input.getInputExpression()+"='" + parameter + "' does not match any of the valid values " + values + " for decision table '" + getName() + "'.",
getName(),
null,
values )
);
}
}
}
return Either.ofRight(true);
}