Line separators in spreadsheet are escaped in RHDM 7.3 / 7.4

Solution Unverified - Updated -


  • After upgrading to RHDM 7.3.0, it throws errors on spreadsheet (.xls) build
line 1:15 no viable alternative at character '\'
line 1:29 no viable alternative at character '\'
line 1:47 no viable alternative at character '\'
line 2:13 no viable alternative at character '\'
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.63 s <<< FAILURE! - in org.drools.decisiontable.LineBreakXLSTest
[ERROR] testMultipleLinesInAction(org.drools.decisiontable.LineBreakXLSTest)  Time elapsed: 0.257 s  <<< ERROR!
    at java.lang.String.indexOf(
    at org.drools.compiler.rule.builder.dialect.DialectUtil.rewriteModifyDescr(
    at org.drools.compiler.rule.builder.dialect.DialectUtil.rewriteDescr(
    at org.drools.compiler.rule.builder.dialect.DialectUtil.fixBlockDescr(
    at org.drools.compiler.rule.builder.dialect.DialectUtil.fixBlockDescr(
    at org.drools.compiler.rule.builder.dialect.asm.AbstractASMConsequenceBuilder.consequenceContext(
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.internalAddRule(
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addRule(
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRulesLevel(
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRules(
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileKnowledgePackages(
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackage(
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackageFromDecisionTable(
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addKnowledgeResource(
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(
    at org.drools.decisiontable.LineBreakXLSTest.testMultipleLinesInAction(
  • Checked with SpreadSheetCompiler, the generated DRL is like this. All line separators in ACTION column are escaped and resulted in "\n".
rule "multiple lines in action_12"
        $fact:Person(name == "John")
        modify($fact){\n setAge(30),\n setAlive(false)\n}
        /* DEBUG */\nSystem.out.println("  **  " +drools.getRule().getName() + ", $fact = " + $fact);
  • After upgrading to RHDM 7.4.0, unexpected line separator escape on spreadsheet (.xls) build is still observed


  • Red Hat Decision Manager
    • 7.3.0
    • 7.4.0
  • Using Spreadsheet (xls/xlsx) and ACTION columns have line separator (So written in multi lines)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In