[JBoss JIRA] (DROOLS-3805) All line separators in RHS in spreadsheet are escaped
by Jozef Marko (Jira)
[ https://issues.jboss.org/browse/DROOLS-3805?page=com.atlassian.jira.plugi... ]
Jozef Marko updated DROOLS-3805:
--------------------------------
Tester: Jozef Marko
> All line separators in RHS in spreadsheet are escaped
> -----------------------------------------------------
>
> Key: DROOLS-3805
> URL: https://issues.jboss.org/browse/DROOLS-3805
> Project: Drools
> Issue Type: Bug
> Components: decision tables
> Affects Versions: 7.18.0.Final, 7.19.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toni Rikkola
> Priority: Major
> Labels: drools-tools, support
>
> By DROOLS-3396, line separators in RHS are now escaped.
> https://github.com/kiegroup/drools/blob/7.18.0.Final/drools-decisiontable...
> However, it affects entire RHS so if you have multiple lines in ACTION, the result would be like this.
> Output from SpreadSheetCompiler:
> {noformat}
> rule "multiple lines in action_12"
> when
> $fact:Person(name == "John")
> then
> modify($fact){\n setAge(30),\n setAlive(false)\n}
> /* DEBUG */\nSystem.out.println(" ** " +drools.getRule().getName() + ", $fact = " + $fact);
> end
> {noformat}
> Error when building:
> {noformat}
> 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!
> java.lang.NullPointerException
> at java.lang.String.indexOf(String.java:1718)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.rewriteModifyDescr(DialectUtil.java:631)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.rewriteDescr(DialectUtil.java:580)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.fixBlockDescr(DialectUtil.java:161)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.fixBlockDescr(DialectUtil.java:119)
> at org.drools.compiler.rule.builder.dialect.asm.AbstractASMConsequenceBuilder.consequenceContext(AbstractASMConsequenceBuilder.java:57)
> at org.drools.compiler.rule.builder.dialect.asm.AbstractASMConsequenceBuilder.build(AbstractASMConsequenceBuilder.java:33)
> at org.drools.compiler.rule.builder.RuleBuilder.build(RuleBuilder.java:126)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.internalAddRule(KnowledgeBuilderImpl.java:1204)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addRule(KnowledgeBuilderImpl.java:1195)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRulesLevel(KnowledgeBuilderImpl.java:1173)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRules(KnowledgeBuilderImpl.java:1121)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileKnowledgePackages(KnowledgeBuilderImpl.java:946)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackage(KnowledgeBuilderImpl.java:937)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackageFromDecisionTable(KnowledgeBuilderImpl.java:371)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addKnowledgeResource(KnowledgeBuilderImpl.java:759)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:2288)
> at org.drools.decisiontable.LineBreakXLSTest.testMultipleLinesInAction(LineBreakXLSTest.java:53)
> ...
> {noformat}
> Escaping should be done only for literal String?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 9 months
[JBoss JIRA] (DROOLS-3805) All line separators in RHS in spreadsheet are escaped
by Jozef Marko (Jira)
[ https://issues.jboss.org/browse/DROOLS-3805?page=com.atlassian.jira.plugi... ]
Jozef Marko updated DROOLS-3805:
--------------------------------
Labels: drools-tools support (was: support)
> All line separators in RHS in spreadsheet are escaped
> -----------------------------------------------------
>
> Key: DROOLS-3805
> URL: https://issues.jboss.org/browse/DROOLS-3805
> Project: Drools
> Issue Type: Bug
> Components: decision tables
> Affects Versions: 7.18.0.Final, 7.19.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toni Rikkola
> Priority: Major
> Labels: drools-tools, support
>
> By DROOLS-3396, line separators in RHS are now escaped.
> https://github.com/kiegroup/drools/blob/7.18.0.Final/drools-decisiontable...
> However, it affects entire RHS so if you have multiple lines in ACTION, the result would be like this.
> Output from SpreadSheetCompiler:
> {noformat}
> rule "multiple lines in action_12"
> when
> $fact:Person(name == "John")
> then
> modify($fact){\n setAge(30),\n setAlive(false)\n}
> /* DEBUG */\nSystem.out.println(" ** " +drools.getRule().getName() + ", $fact = " + $fact);
> end
> {noformat}
> Error when building:
> {noformat}
> 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!
> java.lang.NullPointerException
> at java.lang.String.indexOf(String.java:1718)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.rewriteModifyDescr(DialectUtil.java:631)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.rewriteDescr(DialectUtil.java:580)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.fixBlockDescr(DialectUtil.java:161)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.fixBlockDescr(DialectUtil.java:119)
> at org.drools.compiler.rule.builder.dialect.asm.AbstractASMConsequenceBuilder.consequenceContext(AbstractASMConsequenceBuilder.java:57)
> at org.drools.compiler.rule.builder.dialect.asm.AbstractASMConsequenceBuilder.build(AbstractASMConsequenceBuilder.java:33)
> at org.drools.compiler.rule.builder.RuleBuilder.build(RuleBuilder.java:126)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.internalAddRule(KnowledgeBuilderImpl.java:1204)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addRule(KnowledgeBuilderImpl.java:1195)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRulesLevel(KnowledgeBuilderImpl.java:1173)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRules(KnowledgeBuilderImpl.java:1121)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileKnowledgePackages(KnowledgeBuilderImpl.java:946)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackage(KnowledgeBuilderImpl.java:937)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackageFromDecisionTable(KnowledgeBuilderImpl.java:371)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addKnowledgeResource(KnowledgeBuilderImpl.java:759)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:2288)
> at org.drools.decisiontable.LineBreakXLSTest.testMultipleLinesInAction(LineBreakXLSTest.java:53)
> ...
> {noformat}
> Escaping should be done only for literal String?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 9 months
[JBoss JIRA] (DROOLS-3805) All line separators in RHS in spreadsheet are escaped
by Toni Rikkola (Jira)
[ https://issues.jboss.org/browse/DROOLS-3805?page=com.atlassian.jira.plugi... ]
Toni Rikkola commented on DROOLS-3805:
--------------------------------------
[~tkobayashi] Thank you for the PR, it helps a lot.
> All line separators in RHS in spreadsheet are escaped
> -----------------------------------------------------
>
> Key: DROOLS-3805
> URL: https://issues.jboss.org/browse/DROOLS-3805
> Project: Drools
> Issue Type: Bug
> Components: decision tables
> Affects Versions: 7.18.0.Final, 7.19.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toni Rikkola
> Priority: Major
> Labels: support
>
> By DROOLS-3396, line separators in RHS are now escaped.
> https://github.com/kiegroup/drools/blob/7.18.0.Final/drools-decisiontable...
> However, it affects entire RHS so if you have multiple lines in ACTION, the result would be like this.
> Output from SpreadSheetCompiler:
> {noformat}
> rule "multiple lines in action_12"
> when
> $fact:Person(name == "John")
> then
> modify($fact){\n setAge(30),\n setAlive(false)\n}
> /* DEBUG */\nSystem.out.println(" ** " +drools.getRule().getName() + ", $fact = " + $fact);
> end
> {noformat}
> Error when building:
> {noformat}
> 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!
> java.lang.NullPointerException
> at java.lang.String.indexOf(String.java:1718)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.rewriteModifyDescr(DialectUtil.java:631)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.rewriteDescr(DialectUtil.java:580)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.fixBlockDescr(DialectUtil.java:161)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.fixBlockDescr(DialectUtil.java:119)
> at org.drools.compiler.rule.builder.dialect.asm.AbstractASMConsequenceBuilder.consequenceContext(AbstractASMConsequenceBuilder.java:57)
> at org.drools.compiler.rule.builder.dialect.asm.AbstractASMConsequenceBuilder.build(AbstractASMConsequenceBuilder.java:33)
> at org.drools.compiler.rule.builder.RuleBuilder.build(RuleBuilder.java:126)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.internalAddRule(KnowledgeBuilderImpl.java:1204)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addRule(KnowledgeBuilderImpl.java:1195)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRulesLevel(KnowledgeBuilderImpl.java:1173)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRules(KnowledgeBuilderImpl.java:1121)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileKnowledgePackages(KnowledgeBuilderImpl.java:946)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackage(KnowledgeBuilderImpl.java:937)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackageFromDecisionTable(KnowledgeBuilderImpl.java:371)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addKnowledgeResource(KnowledgeBuilderImpl.java:759)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:2288)
> at org.drools.decisiontable.LineBreakXLSTest.testMultipleLinesInAction(LineBreakXLSTest.java:53)
> ...
> {noformat}
> Escaping should be done only for literal String?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 9 months
[JBoss JIRA] (DROOLS-3787) executable-model build failed because trying to resolve test case in Windows
by Luca Molteni (Jira)
[ https://issues.jboss.org/browse/DROOLS-3787?page=com.atlassian.jira.plugi... ]
Luca Molteni resolved DROOLS-3787.
----------------------------------
Resolution: Done
> executable-model build failed because trying to resolve test case in Windows
> ----------------------------------------------------------------------------
>
> Key: DROOLS-3787
> URL: https://issues.jboss.org/browse/DROOLS-3787
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.18.0.Final, 7.19.0.Final
> Environment: - Windows 2012
> - Windows 7
> Confirmed with some tags
> - 7.14.0.Final-redhat-00004
> - 7.18.0.Final
> - 7.19.0.Final
> - 7.20.0-SNAPSHOT
> Reporter: Toshiya Kobayashi
> Assignee: Luca Molteni
> Priority: Major
> Labels: support
> Attachments: with-test-sources-reproducer.zip
>
>
> Under the condition:
> - Windows
> - executable-model build (mvn clean install -DgenerateModel=YES -DskipTests)
> The build tries to resolve java source under "src/test/java" then failed with the error
> {noformat}
> [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.20.0-SNAPSHOT:generateModel (default-generateModel) on project
> with-test-sources: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.20.0-SNAPSHOT:generateModel faile
> d: Unable to get KieModule, Errors Existed: Error Messages:
> [ERROR] Message [id=1, level=ERROR, path=src/test/java/com/sample/SampleTest.java, line=15, column=372
> [ERROR] text=Only a type can be imported. org.mockito.Mockito resolves to a package]
> [ERROR] Message [id=2, level=ERROR, path=src/test/java/com/sample/SampleTest.java, line=22, column=563
> [ERROR] text=Mockito cannot be resolved]
> [ERROR] ---
> {noformat}
> It doesn't happen in MacOS/RHEL7
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 9 months
[JBoss JIRA] (DROOLS-3805) All line separators in RHS in spreadsheet are escaped
by Toni Rikkola (Jira)
[ https://issues.jboss.org/browse/DROOLS-3805?page=com.atlassian.jira.plugi... ]
Toni Rikkola reassigned DROOLS-3805:
------------------------------------
Assignee: Toni Rikkola (was: Mario Fusco)
> All line separators in RHS in spreadsheet are escaped
> -----------------------------------------------------
>
> Key: DROOLS-3805
> URL: https://issues.jboss.org/browse/DROOLS-3805
> Project: Drools
> Issue Type: Bug
> Components: decision tables
> Affects Versions: 7.18.0.Final, 7.19.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toni Rikkola
> Priority: Major
> Labels: support
>
> By DROOLS-3396, line separators in RHS are now escaped.
> https://github.com/kiegroup/drools/blob/7.18.0.Final/drools-decisiontable...
> However, it affects entire RHS so if you have multiple lines in ACTION, the result would be like this.
> Output from SpreadSheetCompiler:
> {noformat}
> rule "multiple lines in action_12"
> when
> $fact:Person(name == "John")
> then
> modify($fact){\n setAge(30),\n setAlive(false)\n}
> /* DEBUG */\nSystem.out.println(" ** " +drools.getRule().getName() + ", $fact = " + $fact);
> end
> {noformat}
> Error when building:
> {noformat}
> 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!
> java.lang.NullPointerException
> at java.lang.String.indexOf(String.java:1718)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.rewriteModifyDescr(DialectUtil.java:631)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.rewriteDescr(DialectUtil.java:580)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.fixBlockDescr(DialectUtil.java:161)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.fixBlockDescr(DialectUtil.java:119)
> at org.drools.compiler.rule.builder.dialect.asm.AbstractASMConsequenceBuilder.consequenceContext(AbstractASMConsequenceBuilder.java:57)
> at org.drools.compiler.rule.builder.dialect.asm.AbstractASMConsequenceBuilder.build(AbstractASMConsequenceBuilder.java:33)
> at org.drools.compiler.rule.builder.RuleBuilder.build(RuleBuilder.java:126)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.internalAddRule(KnowledgeBuilderImpl.java:1204)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addRule(KnowledgeBuilderImpl.java:1195)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRulesLevel(KnowledgeBuilderImpl.java:1173)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRules(KnowledgeBuilderImpl.java:1121)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileKnowledgePackages(KnowledgeBuilderImpl.java:946)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackage(KnowledgeBuilderImpl.java:937)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackageFromDecisionTable(KnowledgeBuilderImpl.java:371)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addKnowledgeResource(KnowledgeBuilderImpl.java:759)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:2288)
> at org.drools.decisiontable.LineBreakXLSTest.testMultipleLinesInAction(LineBreakXLSTest.java:53)
> ...
> {noformat}
> Escaping should be done only for literal String?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 9 months
[JBoss JIRA] (DROOLS-3805) All line separators in RHS in spreadsheet are escaped
by Toshiya Kobayashi (Jira)
[ https://issues.jboss.org/browse/DROOLS-3805?page=com.atlassian.jira.plugi... ]
Toshiya Kobayashi updated DROOLS-3805:
--------------------------------------
Git Pull Request: https://github.com/kiegroup/drools/pull/2293
Sent a unit test PR
https://github.com/kiegroup/drools/pull/2293
> All line separators in RHS in spreadsheet are escaped
> -----------------------------------------------------
>
> Key: DROOLS-3805
> URL: https://issues.jboss.org/browse/DROOLS-3805
> Project: Drools
> Issue Type: Bug
> Components: decision tables
> Affects Versions: 7.18.0.Final, 7.19.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Mario Fusco
> Priority: Major
> Labels: support
>
> By DROOLS-3396, line separators in RHS are now escaped.
> https://github.com/kiegroup/drools/blob/7.18.0.Final/drools-decisiontable...
> However, it affects entire RHS so if you have multiple lines in ACTION, the result would be like this.
> Output from SpreadSheetCompiler:
> {noformat}
> rule "multiple lines in action_12"
> when
> $fact:Person(name == "John")
> then
> modify($fact){\n setAge(30),\n setAlive(false)\n}
> /* DEBUG */\nSystem.out.println(" ** " +drools.getRule().getName() + ", $fact = " + $fact);
> end
> {noformat}
> Error when building:
> {noformat}
> 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!
> java.lang.NullPointerException
> at java.lang.String.indexOf(String.java:1718)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.rewriteModifyDescr(DialectUtil.java:631)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.rewriteDescr(DialectUtil.java:580)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.fixBlockDescr(DialectUtil.java:161)
> at org.drools.compiler.rule.builder.dialect.DialectUtil.fixBlockDescr(DialectUtil.java:119)
> at org.drools.compiler.rule.builder.dialect.asm.AbstractASMConsequenceBuilder.consequenceContext(AbstractASMConsequenceBuilder.java:57)
> at org.drools.compiler.rule.builder.dialect.asm.AbstractASMConsequenceBuilder.build(AbstractASMConsequenceBuilder.java:33)
> at org.drools.compiler.rule.builder.RuleBuilder.build(RuleBuilder.java:126)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.internalAddRule(KnowledgeBuilderImpl.java:1204)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addRule(KnowledgeBuilderImpl.java:1195)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRulesLevel(KnowledgeBuilderImpl.java:1173)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRules(KnowledgeBuilderImpl.java:1121)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileKnowledgePackages(KnowledgeBuilderImpl.java:946)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackage(KnowledgeBuilderImpl.java:937)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackageFromDecisionTable(KnowledgeBuilderImpl.java:371)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addKnowledgeResource(KnowledgeBuilderImpl.java:759)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:2288)
> at org.drools.decisiontable.LineBreakXLSTest.testMultipleLinesInAction(LineBreakXLSTest.java:53)
> ...
> {noformat}
> Escaping should be done only for literal String?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 9 months