use of org.drools.compiler.rule.builder.dialect.mvel.MVELDialect in project drools by kiegroup.
the class PatternBuilder method createAndBuildPredicate.
protected Constraint createAndBuildPredicate(RuleBuildContext context, Pattern pattern, BaseDescr base, String expr, Map<String, OperatorDescr> aliases) {
Dialect dialect = context.getDialect();
MVELDialect mvelDialect = (MVELDialect) context.getDialect("mvel");
context.setDialect(mvelDialect);
PredicateDescr pdescr = new PredicateDescr(context.getRuleDescr().getResource(), expr);
pdescr.copyParameters(base);
pdescr.copyLocation(base);
Constraint evalConstraint = buildEval(context, pattern, pdescr, aliases, expr, false);
// fall back to original dialect
context.setDialect(dialect);
return evalConstraint;
}
Aggregations