[JBoss JIRA] (DROOLS-5217) Executable model compilation fails when binding a list from double square bracket
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-5217?page=com.atlassian.jira.plug... ]
Mario Fusco resolved DROOLS-5217.
---------------------------------
Resolution: Done
Fixed by https://github.com/kiegroup/drools/commit/a433c628b9a0c4853d9ea0b7e69fa9e...
> Executable model compilation fails when binding a list from double square bracket
> ---------------------------------------------------------------------------------
>
> Key: DROOLS-5217
> URL: https://issues.redhat.com/browse/DROOLS-5217
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.35.0.Final
> Reporter: Matteo Casalino
> Assignee: Mario Fusco
> Priority: Major
> Attachments: binding-list-from-double-square-bracket.zip
>
>
> Executable model rule compilation fails when trying to bind a _List_ from a double square bracket
> Example of DRL that fails to compile:
> {noformat}
> rule "binding field indexed with square brackets"
> when $boundList: java.util.List() from [[1,2,3]]
> Pojo($boundList.containsAll(integerList))
> then
> end
> {noformat}
> Error:
> {noformat}
> com.github.javaparser.ParseProblemException: Encountered unexpected token: "[" "["
> at line 1, column 1.
>
> Was expecting one of:
>
> "!"
> "("
> "+"
> "++"
> ...
> {noformat}
> The example works fine when compiling without executable model.
> We acknowledge that there are better and more efficient ways to achieve the same result as the above example, but there are perhaps other use-cases for the double square bracket mvel expression. As it is supported in DRL, should it be supported with executable model too?
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (DROOLS-5225) Constraint grouping fails with executable model
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-5225?page=com.atlassian.jira.plug... ]
Mario Fusco updated DROOLS-5225:
--------------------------------
Sprint: 2020 Week 13-15 (from Mar 23)
> Constraint grouping fails with executable model
> -----------------------------------------------
>
> Key: DROOLS-5225
> URL: https://issues.redhat.com/browse/DROOLS-5225
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.35.0.Final
> Reporter: Matteo Casalino
> Assignee: Mario Fusco
> Priority: Major
> Attachments: constraints-grouping.zip
>
>
> Executable model rule compilation fails when trying to build a pattern using constraint grouping.
> Example of DRL that fails to compile:
> {noformat}
> rule "TestBusiness"
> when $p : Pojo(departuretimedayofweek (== 1 || == 2 || == 7) )
> then
> end
> {noformat}
> Error:
> {noformat}
> java.lang.StackOverflowError
> at java.base/java.util.LinkedList.unlink(LinkedList.java:215)
> at java.base/java.util.LinkedList.remove(LinkedList.java:530)
> at com.github.javaparser.ast.Node.setParentNode(Node.java:389)
> at com.github.javaparser.ast.Node.setAsParentNodeOf(Node.java:403)
> at com.github.javaparser.ast.expr.BinaryExpr.setLeft(BinaryExpr.java:174)
> at com.github.javaparser.ast.expr.BinaryExpr.<init>(BinaryExpr.java:131)
> at com.github.javaparser.ast.expr.BinaryExpr.<init>(BinaryExpr.java:122)
> at org.drools.modelcompiler.builder.generator.DrlxParseUtil.trasformHalfBinaryToBinary(DrlxParseUtil.java:347)
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:194)
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:185)
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:195)
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:185)
> ...
> {noformat}
> The example works fine when compiling without executable model.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (DROOLS-5224) KieBase build fails with forall patterns containing "not equal" constraints on Dates
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-5224?page=com.atlassian.jira.plug... ]
Mario Fusco updated DROOLS-5224:
--------------------------------
Sprint: 2020 Week 13-15 (from Mar 23)
> KieBase build fails with forall patterns containing "not equal" constraints on Dates
> ------------------------------------------------------------------------------------
>
> Key: DROOLS-5224
> URL: https://issues.redhat.com/browse/DROOLS-5224
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.33.0.Final, 7.34.0.Final, 7.35.0.Final
> Reporter: Matteo Casalino
> Assignee: Mario Fusco
> Priority: Major
> Attachments: forall-not-equal-constraint-on-dates.zip
>
>
> This is the same issue as https://issues.redhat.com/browse/DROOLS-5100, but on Dates.
> As of Drools 7.33.0.Final, forall patterns with "not equal" (!=) constraints on Dates will break when building the KieBase.
> For example the following DRL:
> {noformat}
> rule "forall with not equal"
> when forall(java.util.Date(this != "29-Dec-2019"))
> then
> end
> {noformat}
>
> generates the following error:
> {noformat}
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>
> at java.lang.String.substring(String.java:1967)
> at org.drools.core.rule.constraint.MvelConstraint.getLeftInExpression(MvelConstraint.java:608)
> at org.drools.core.rule.constraint.MvelConstraint.hashCode(MvelConstraint.java:602)
> at org.drools.core.reteoo.AlphaNode.calculateHashCode(AlphaNode.java:189)
> at org.drools.core.reteoo.AlphaNode.<init>(AlphaNode.java:89)
> at org.drools.core.reteoo.builder.PhreakNodeFactory.buildAlphaNode(PhreakNodeFactory.java:88)
> at org.drools.core.reteoo.builder.PatternBuilder.buildAlphaNodeChain(PatternBuilder.java:360)
> at org.drools.core.reteoo.builder.PatternBuilder.attachAlphaNodes(PatternBuilder.java:346)
> at org.drools.core.reteoo.builder.PatternBuilder.attachPattern(PatternBuilder.java:136)
> at org.drools.core.reteoo.builder.PatternBuilder.build(PatternBuilder.java:84)
> at org.drools.core.reteoo.builder.GroupElementBuilder$NotBuilder.build(GroupElementBuilder.java:220)
> at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
> at org.drools.core.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:108)
> at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
> at org.drools.core.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:167)
> at org.drools.core.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:139)
> at org.drools.core.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:110)
> at org.drools.core.impl.KnowledgeBaseImpl.internalAddRule(KnowledgeBaseImpl.java:1525)
> at org.drools.core.impl.KnowledgeBaseImpl.internalAddPackages(KnowledgeBaseImpl.java:926)
> at org.drools.core.impl.KnowledgeBaseImpl.lambda$addPackages$2(KnowledgeBaseImpl.java:728)
> at org.drools.core.impl.KnowledgeBaseImpl.enqueueModification(KnowledgeBaseImpl.java:745)
> at org.drools.core.impl.KnowledgeBaseImpl.addPackages(KnowledgeBaseImpl.java:728)
> at org.drools.compiler.kie.builder.impl.AbstractKieModule.createKieBase(AbstractKieModule.java:226)
> at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:407)
> at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:375)
> {noformat}
> This is working fine when using Drools <= 7.32.0.Final.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (DROOLS-5225) Constraint grouping fails with executable model
by Matteo Casalino (Jira)
Matteo Casalino created DROOLS-5225:
---------------------------------------
Summary: Constraint grouping fails with executable model
Key: DROOLS-5225
URL: https://issues.redhat.com/browse/DROOLS-5225
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.35.0.Final
Reporter: Matteo Casalino
Assignee: Mario Fusco
Attachments: constraints-grouping.zip
Executable model rule compilation fails when trying to build a pattern using constraint grouping.
Example of DRL that fails to compile:
{noformat}
rule "TestBusiness"
when $p : Pojo(departuretimedayofweek (== 1 || == 2 || == 7) )
then
end
{noformat}
Error:
{noformat}
java.lang.StackOverflowError
at java.base/java.util.LinkedList.unlink(LinkedList.java:215)
at java.base/java.util.LinkedList.remove(LinkedList.java:530)
at com.github.javaparser.ast.Node.setParentNode(Node.java:389)
at com.github.javaparser.ast.Node.setAsParentNodeOf(Node.java:403)
at com.github.javaparser.ast.expr.BinaryExpr.setLeft(BinaryExpr.java:174)
at com.github.javaparser.ast.expr.BinaryExpr.<init>(BinaryExpr.java:131)
at com.github.javaparser.ast.expr.BinaryExpr.<init>(BinaryExpr.java:122)
at org.drools.modelcompiler.builder.generator.DrlxParseUtil.trasformHalfBinaryToBinary(DrlxParseUtil.java:347)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:194)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:185)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:195)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:185)
...
{noformat}
The example works fine when compiling without executable model.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (WFLY-13333) OpenAPI endpoint returns empty file if schema definition contains non ASCII character
by Radoslav Husar (Jira)
[ https://issues.redhat.com/browse/WFLY-13333?page=com.atlassian.jira.plugi... ]
Radoslav Husar updated WFLY-13333:
----------------------------------
Summary: OpenAPI endpoint returns empty file if schema definition contains non ASCII character (was: Openapi endpoint returns empty file if schema definition contains non ASCII character)
> OpenAPI endpoint returns empty file if schema definition contains non ASCII character
> -------------------------------------------------------------------------------------
>
> Key: WFLY-13333
> URL: https://issues.redhat.com/browse/WFLY-13333
> Project: WildFly
> Issue Type: Bug
> Components: MP OpenAPI
> Affects Versions: 19.0.0.Final
> Reporter: Márk Petrényi
> Assignee: Paul Ferraro
> Priority: Blocker
> Fix For: 19.0.1.Final, 20.0.0.Beta1
>
>
> Currently the {{/openapi}} endpoint returns empty file if the OpenAPI schema definition contains non ASCII characters (ie. accented letters like á,í...).
> I extended the openapi quickstart for demonstration: https://github.com/petrenyi-mark/quickstart/commit/44096980ff36ff2655859f...
> It seems like it is related to the content-length, since in {{OpenAPIHttpHandler}} the content-length header is set by {{String.length()}} (line 125). However before the response is actually returned, undertow validates that the actual content-length based on ByteBuffer size is not greater then the one declared in the response header. Since non ASCII characters are usually represented by 2 bytes undertow will fail, thus no content will be returned.
> In {{OpenAPIHttpHandler}} setting {{string.getBytes(charset).length}} as Conetnt-Length instead of {{String.length()}} would likely resolve this issue.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (DROOLS-5224) KieBase build fails with forall patterns containing "not equal" constraints on Dates
by Matteo Casalino (Jira)
Matteo Casalino created DROOLS-5224:
---------------------------------------
Summary: KieBase build fails with forall patterns containing "not equal" constraints on Dates
Key: DROOLS-5224
URL: https://issues.redhat.com/browse/DROOLS-5224
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.35.0.Final, 7.34.0.Final, 7.33.0.Final
Reporter: Matteo Casalino
Assignee: Mario Fusco
Attachments: forall-not-equal-constraint-on-dates.zip
This is the same issue as https://issues.redhat.com/browse/DROOLS-5100, but on Dates.
As of Drools 7.33.0.Final, forall patterns with "not equal" (!=) constraints on Dates will break when building the KieBase.
For example the following DRL:
{noformat}
rule "forall with not equal"
when forall(java.util.Date(this != "29-Dec-2019"))
then
end
{noformat}
generates the following error:
{noformat}
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at org.drools.core.rule.constraint.MvelConstraint.getLeftInExpression(MvelConstraint.java:608)
at org.drools.core.rule.constraint.MvelConstraint.hashCode(MvelConstraint.java:602)
at org.drools.core.reteoo.AlphaNode.calculateHashCode(AlphaNode.java:189)
at org.drools.core.reteoo.AlphaNode.<init>(AlphaNode.java:89)
at org.drools.core.reteoo.builder.PhreakNodeFactory.buildAlphaNode(PhreakNodeFactory.java:88)
at org.drools.core.reteoo.builder.PatternBuilder.buildAlphaNodeChain(PatternBuilder.java:360)
at org.drools.core.reteoo.builder.PatternBuilder.attachAlphaNodes(PatternBuilder.java:346)
at org.drools.core.reteoo.builder.PatternBuilder.attachPattern(PatternBuilder.java:136)
at org.drools.core.reteoo.builder.PatternBuilder.build(PatternBuilder.java:84)
at org.drools.core.reteoo.builder.GroupElementBuilder$NotBuilder.build(GroupElementBuilder.java:220)
at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
at org.drools.core.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:108)
at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
at org.drools.core.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:167)
at org.drools.core.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:139)
at org.drools.core.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:110)
at org.drools.core.impl.KnowledgeBaseImpl.internalAddRule(KnowledgeBaseImpl.java:1525)
at org.drools.core.impl.KnowledgeBaseImpl.internalAddPackages(KnowledgeBaseImpl.java:926)
at org.drools.core.impl.KnowledgeBaseImpl.lambda$addPackages$2(KnowledgeBaseImpl.java:728)
at org.drools.core.impl.KnowledgeBaseImpl.enqueueModification(KnowledgeBaseImpl.java:745)
at org.drools.core.impl.KnowledgeBaseImpl.addPackages(KnowledgeBaseImpl.java:728)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.createKieBase(AbstractKieModule.java:226)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:407)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:375)
{noformat}
This is working fine when using Drools <= 7.32.0.Final.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (DROOLS-3169) [DMN Designer] Last Context Entry differentiation
by Edson Tirelli (Jira)
[ https://issues.redhat.com/browse/DROOLS-3169?page=com.atlassian.jira.plug... ]
Edson Tirelli commented on DROOLS-3169:
---------------------------------------
Reversing directions a bit from my previous comment, but I actually think the way the tool is presenting this boxed expression now is fine, with the read-only, "<result>" label, in grey italics.
I am ok closing this ticket and if in the future we get a RFE from someone, then we can re-open and implement a change.
> [DMN Designer] Last Context Entry differentiation
> -------------------------------------------------
>
> Key: DROOLS-3169
> URL: https://issues.redhat.com/browse/DROOLS-3169
> Project: Drools
> Issue Type: Enhancement
> Components: DMN Editor
> Affects Versions: 7.14.0.Final
> Reporter: Jozef Marko
> Assignee: Guilherme Gomes
> Priority: Major
> Labels: drools-tools
> Fix For: 7.36.0.Final
>
> Attachments: Screenshot 2018-10-23 18.37.56.png, Screenshot from 2018-10-22 17-35-07.png
>
>
> The last Context Entry, shown in the attachment, should be differentiated to other Context Entries. Currently we differentiate it just by the Name *Default* that user can not change.
> We should improve this in one of the following ways:
> - Keep name *Default*, change font to italics and use grey background color
> - Merge the *Default* and *Value* cells of last entry and remove the name *Default*
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (DROOLS-5223) User cannot open malformed scesim file. Loading popup is spining infinitive times
by Anna Dupliak (Jira)
Anna Dupliak created DROOLS-5223:
------------------------------------
Summary: User cannot open malformed scesim file. Loading popup is spining infinitive times
Key: DROOLS-5223
URL: https://issues.redhat.com/browse/DROOLS-5223
Project: Drools
Issue Type: Bug
Components: Scenario Simulation and Testing
Affects Versions: 7.35.0.Final, 7.34.0.Final, 7.33.0.Final
Reporter: Anna Dupliak
Assignee: Daniele Zonca
Attachments: Traffic.scesim
If user import Scesim file that have xml tag unclosed,
then user gets warning, but loading popup is not disappearing
and user cannot proceed.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months