我正在使用Drools 6.2.0.Final和Excel决策表来定义规则。
一切正常,但如果我尝试在单元格中使用折断线(alt +在Excel中输入),我会在规则编译中获得以下异常
Caused by: java.lang.RuntimeException: Error while creating KieBase[Message [id=1, level=ERROR, path=myrules/objects.xls, line=6, column=0
text=Rule Compilation error String literal is not properly closed by a double-quote]]
at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:395)
at org.kie.spring.KieObjectsResolver.resolveKBase(KieObjectsResolver.java:33)
at org.kie.spring.factorybeans.KBaseFactoryBean.afterPropertiesSet(KBaseFactoryBean.java:162)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
... 50 more
有没有办法在单元格中使用断行来进行规则定义?
答案 0 :(得分:1)
经过多次尝试后,我找到了解决此问题的方法。 如果其他人有同样的问题,我会分享它
您必须添加到表格标题
EscapeQuotes false
并在单元格中使用以下语法
Line 1"+
"Line 2"+
"Line 3