"drools",
KnowledgeHelper.class,
false );
final EvalCondition eval = new EvalCondition( previousDeclarations );
MVELEvalExpression expr = new MVELEvalExpression( unit,
dialect.getId() );
eval.setEvalExpression( KiePolicyHelper.isPolicyEnabled() ? new SafeEvalExpression(expr) : expr );
MVELDialectRuntimeData data = (MVELDialectRuntimeData) context.getPkg().getDialectRuntimeRegistry().getDialectData( "mvel" );
data.addCompileable( eval,
expr );
expr.compile( data );
return eval;
} catch ( final Exception e ) {
copyErrorLocation(e, evalDescr);
context.addError( new DescrBuildError( context.getParentDescr(),
evalDescr,