Search in sources :

Example 1 with ModifyCompiler

use of org.drools.mvelcompiler.ModifyCompiler in project drools by kiegroup.

the class Consequence method rewriteModifyBlock.

private String rewriteModifyBlock(String consequence) {
    int modifyPos = StringUtils.indexOfOutOfQuotes(consequence, "modify");
    if (modifyPos < 0) {
        return consequence;
    }
    ModifyCompiler modifyCompiler = new ModifyCompiler();
    CompiledBlockResult compile = modifyCompiler.compile(addCurlyBracesToBlock(consequence));
    return printNode(compile.statementResults());
}
Also used : ModifyCompiler(org.drools.mvelcompiler.ModifyCompiler) CompiledBlockResult(org.drools.mvelcompiler.CompiledBlockResult)

Aggregations

CompiledBlockResult (org.drools.mvelcompiler.CompiledBlockResult)1 ModifyCompiler (org.drools.mvelcompiler.ModifyCompiler)1