[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)
6 years, 6 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)
6 years, 6 months
[JBoss JIRA] (DROOLS-3805) All line separators in RHS in spreadsheet are escaped
by Toshiya Kobayashi (Jira)
Toshiya Kobayashi created DROOLS-3805:
-----------------------------------------
Summary: 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.19.0.Final, 7.18.0.Final
Reporter: Toshiya Kobayashi
Assignee: Mario Fusco
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)
6 years, 6 months
[JBoss JIRA] (DROOLS-3798) [DMN Designer] Included Models - Show imported nodes in the graph when a DMN with imported nodes is opened
by Guilherme Gomes (Jira)
[ https://issues.jboss.org/browse/DROOLS-3798?page=com.atlassian.jira.plugi... ]
Guilherme Gomes reassigned DROOLS-3798:
---------------------------------------
Assignee: Daniel José dos Santos (was: Guilherme Gomes)
> [DMN Designer] Included Models - Show imported nodes in the graph when a DMN with imported nodes is opened
> ----------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-3798
> URL: https://issues.jboss.org/browse/DROOLS-3798
> Project: Drools
> Issue Type: Task
> Components: DMN Editor
> Reporter: Guilherme Gomes
> Assignee: Daniel José dos Santos
> Priority: Major
> Labels: drools-tools
> Attachments: daniel1.dmn, daniel2.dmn
>
>
> When users open the DMN editor with an imported file+ imported nodes, they must be able to see these nodes on read-only mode.
> ---
> Assets:
> - [^daniel1.dmn]
> - [^daniel2.dmn]
> ---
> This task comprehends:
> - Read imported nodes in the "daniel2.dmn", and put them into the canvas by consuming a *mocked service class* [1] to fill the node information;
> - Create the new imported nodes in the canvas;
> - Persist imported nodes info properly in the DMN file (when users save it);
> - Keep these imported nodes on read-only mode;
> - Keep the properties panel correctly updated.
> ---
> Acceptance criteria:
> - Open the "daniel2.dmn"
> - See the imported nodes from the "daniel1.dmn"
> - Try to change the name of the node (this should not be allowed, since the node must be on read only mode)
> - Check the properties panel properties
> ---
> [1] This service class will be responsible for returning all information from a given node from another DMN file. This API will be something like this: {{ExternalDMNFileService.getNode(final String dmnElementRef)}}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 7 months
[JBoss JIRA] (DROOLS-3798) [DMN Designer] Included Models - Show imported nodes in the graph when a DMN with imported nodes is opened
by Guilherme Gomes (Jira)
[ https://issues.jboss.org/browse/DROOLS-3798?page=com.atlassian.jira.plugi... ]
Guilherme Gomes reassigned DROOLS-3798:
---------------------------------------
Assignee: Guilherme Gomes (was: Daniel José dos Santos)
> [DMN Designer] Included Models - Show imported nodes in the graph when a DMN with imported nodes is opened
> ----------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-3798
> URL: https://issues.jboss.org/browse/DROOLS-3798
> Project: Drools
> Issue Type: Task
> Components: DMN Editor
> Reporter: Guilherme Gomes
> Assignee: Guilherme Gomes
> Priority: Major
> Labels: drools-tools
> Attachments: daniel1.dmn, daniel2.dmn
>
>
> When users open the DMN editor with an imported file+ imported nodes, they must be able to see these nodes on read-only mode.
> ---
> Assets:
> - [^daniel1.dmn]
> - [^daniel2.dmn]
> ---
> This task comprehends:
> - Read imported nodes in the "daniel2.dmn", and put them into the canvas by consuming a *mocked service class* [1] to fill the node information;
> - Create the new imported nodes in the canvas;
> - Persist imported nodes info properly in the DMN file (when users save it);
> - Keep these imported nodes on read-only mode;
> - Keep the properties panel correctly updated.
> ---
> Acceptance criteria:
> - Open the "daniel2.dmn"
> - See the imported nodes from the "daniel1.dmn"
> - Try to change the name of the node (this should not be allowed, since the node must be on read only mode)
> - Check the properties panel properties
> ---
> [1] This service class will be responsible for returning all information from a given node from another DMN file. This API will be something like this: {{ExternalDMNFileService.getNode(final String dmnElementRef)}}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 7 months