use of org.knime.base.node.rules.engine.Rule.Outcome.GenericOutcome in project knime-core by knime.
the class StreamingUtil method checkExpressions.
private static boolean checkExpressions(final Rule rule, final Predicate<Expression> check) {
if (!rule.getCondition().isEnabled()) {
// comment
return true;
}
if (rule instanceof GenericRule) {
final GenericRule gr = (GenericRule) rule;
final Condition condition = gr.getCondition();
if (condition instanceof GenericCondition) {
final GenericCondition gc = (GenericCondition) condition;
final Expression ce = gc.getExpression();
final Outcome outcome = gr.getOutcome();
if (outcome instanceof GenericOutcome) {
final GenericOutcome go = (GenericOutcome) outcome;
final Expression oe = go.getExpression();
return check.test(oe) && check.test(ce);
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
Aggregations