use of org.drools.modelcompiler.builder.errors.MvelCompilationError in project drools by kiegroup.
the class Consequence method createExecuteCallMvel.
private MethodCallExpr createExecuteCallMvel(String consequenceString, BlockStmt ruleVariablesBlock, Set<String> usedDeclarationInRHS, MethodCallExpr onCall) {
String mvelBlock = addCurlyBracesToBlock(consequenceString);
CompiledBlockResult compile;
try {
compile = DrlxParseUtil.createMvelCompiler(context).compileStatement(mvelBlock);
} catch (MvelCompilerException e) {
context.addCompilationError(new CompilationProblemErrorResult(new MvelCompilationError(e)));
return null;
}
replaceKcontext(compile.statementResults());
rewriteChannels(compile.statementResults());
return executeCall(ruleVariablesBlock, compile.statementResults(), usedDeclarationInRHS, onCall, compile.getUsedBindings());
}
Aggregations