[JBoss JIRA] (DROOLS-5542) org.apache.maven.plugins:maven-compiler-plugin fails on the generated model
by Luca Molteni (Jira)
[ https://issues.redhat.com/browse/DROOLS-5542?page=com.atlassian.jira.plug... ]
Luca Molteni updated DROOLS-5542:
---------------------------------
Sprint: 2020 Week 31-33 (from Jul 27)
> org.apache.maven.plugins:maven-compiler-plugin fails on the generated model
> ---------------------------------------------------------------------------
>
> Key: DROOLS-5542
> URL: https://issues.redhat.com/browse/DROOLS-5542
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.40.0.Final
> Reporter: Ciprian Chiru
> Assignee: Luca Molteni
> Priority: Major
>
> Given a rule as such (modified from the standard example):
>
> {code:java}
> global org.example.drools.service.DummyService dummyService;
> rule "will execute per each Measurement having ID color"
> no-loop
> when
> Measurement( id == "color", $colorVal : val )
> $var1: String() from dummyService.dummy("a");
> $var2: String() from dummyService.dummy("b");
> $var3: String() from dummyService.dummy("c");
> String() from dummyService.dummy($var1, $var2, $var3)
> then
> controlSet.add($colorVal);
> end{code}
> The _org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile_ fails with:
> {code:java}
> no suitable method found for from(org.drools.model.Global<org.example.drools.service.DummyService>,org.drools.model.Variable<java.lang.String>,org.drools.model.Variable<java.lang.String>,org.drools.model.Variable<java.lang.String>,rules.PFD.LambdaExtractorFD1FA74D5FA8CFA329D97E34A42287FA)
> [ERROR] method org.drools.model.DSL.<T>from(T) is not applicable
> [ERROR] (cannot infer type-variable(s) T
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<T>from(org.drools.model.Variable<T>) is not applicable
> [ERROR] (cannot infer type-variable(s) T
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<T>from(org.drools.model.functions.Function0<T>) is not applicable
> [ERROR] (cannot infer type-variable(s) T
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<T>from(org.drools.model.Variable<T>,org.drools.model.functions.Function1<T,?>) is not applicable
> [ERROR] (cannot infer type-variable(s) T
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<A,B>from(org.drools.model.Variable<A>,org.drools.model.Variable<B>,org.drools.model.functions.Function2<A,B,?>) is not applicable
> [ERROR] (cannot infer type-variable(s) A,B
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<A,B,C>from(org.drools.model.Variable<A>,org.drools.model.Variable<B>,org.drools.model.Variable<C>,org.drools.model.functions.Function3<A,B,C,?>) is not applicable
> [ERROR] (cannot infer type-variable(s) A,B,C
> [ERROR] (actual and formal argument lists differ in length)){code}
>
> So the DSL.from() cannot accept more than 2 variables.
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (DROOLS-5551) Cannot configure kie-maven-plugin to read the rules from a different folder
by Luca Molteni (Jira)
[ https://issues.redhat.com/browse/DROOLS-5551?page=com.atlassian.jira.plug... ]
Luca Molteni updated DROOLS-5551:
---------------------------------
Attachment: image.jpeg
image.png
> Cannot configure kie-maven-plugin to read the rules from a different folder
> ---------------------------------------------------------------------------
>
> Key: DROOLS-5551
> URL: https://issues.redhat.com/browse/DROOLS-5551
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.31.0.Final, 7.32.0.Final, 7.33.0.Final, 7.34.0.Final, 7.35.0.Final, 7.36.0.Final, 7.37.0.Final, 7.38.0.Final, 7.39.0.Final, 7.40.0.Final
> Reporter: Ciprian Chiru
> Assignee: Luca Molteni
> Priority: Minor
> Attachments: image.jpeg, image.png
>
>
> _kie-maven-plugin_ ignores _sourceFolder_ configuration and there is no other option to set the rules directory. It always looks for rules in the project's resources folder.
>
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (DROOLS-5551) Cannot configure kie-maven-plugin to read the rules from a different folder
by Ciprian Chiru (Jira)
Ciprian Chiru created DROOLS-5551:
-------------------------------------
Summary: Cannot configure kie-maven-plugin to read the rules from a different folder
Key: DROOLS-5551
URL: https://issues.redhat.com/browse/DROOLS-5551
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.40.0.Final, 7.39.0.Final, 7.38.0.Final, 7.37.0.Final, 7.36.0.Final, 7.35.0.Final, 7.34.0.Final, 7.33.0.Final, 7.32.0.Final, 7.31.0.Final
Reporter: Ciprian Chiru
Assignee: Luca Molteni
_kie-maven-plugin_ ignores _sourceFolder_ configuration and there is no other option to set the rules directory. It always looks for rules in the project's resources folder.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (DROOLS-5550) Drools model compiler fails when assigning salience from a static constant
by Ciprian Chiru (Jira)
Ciprian Chiru created DROOLS-5550:
-------------------------------------
Summary: Drools model compiler fails when assigning salience from a static constant
Key: DROOLS-5550
URL: https://issues.redhat.com/browse/DROOLS-5550
Project: Drools
Issue Type: Bug
Affects Versions: 7.40.0.Final, 7.39.0.Final, 7.38.0.Final, 7.37.0.Final, 7.36.0.Final, 7.35.0.Final, 7.34.0.Final, 7.33.0.Final, 7.32.0.Final, 7.31.0.Final
Reporter: Ciprian Chiru
Assignee: Mario Fusco
Given the example rule:
{code:java}
global java.util.Set controlSet;
rule "will execute per each Measurement having ID color"
salience Salience.NORMAL
no-loop
when
Measurement( id == "color", $colorVal : val )
then
controlSet.add($colorVal);
end{code}
when compiling the rules, the _org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile_ throws:
{code:java}
Compilation failure
[ERROR] .../target/generated-sources/drools-model-compiler/main/java/rules/Rules1b5c9512461f45df875fa525fff06227RuleMethods0.java:[28,109] no suitable method found for supply(int)
[ERROR] method org.drools.model.DSL.<A,R>supply(org.drools.model.Variable<A>,org.drools.model.functions.Function1<A,R>) is not applicable
[ERROR] (cannot infer type-variable(s) A,R
[ERROR] (actual and formal argument lists differ in length))
[ERROR] method org.drools.model.DSL.<A,B,R>supply(org.drools.model.Variable<A>,org.drools.model.Variable<B>,org.drools.model.functions.Function2<A,B,R>) is not applicable
[ERROR] (cannot infer type-variable(s) A,B,R
[ERROR] (actual and formal argument lists differ in length)){code}
The same rule works fine when the rule is not pre-compiled.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (DROOLS-5542) org.apache.maven.plugins:maven-compiler-plugin fails on the generated model
by Ciprian Chiru (Jira)
[ https://issues.redhat.com/browse/DROOLS-5542?page=com.atlassian.jira.plug... ]
Ciprian Chiru updated DROOLS-5542:
----------------------------------
Priority: Major (was: Critical)
> org.apache.maven.plugins:maven-compiler-plugin fails on the generated model
> ---------------------------------------------------------------------------
>
> Key: DROOLS-5542
> URL: https://issues.redhat.com/browse/DROOLS-5542
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.40.0.Final
> Reporter: Ciprian Chiru
> Assignee: Luca Molteni
> Priority: Major
>
> Given a rule as such (modified from the standard example):
>
> {code:java}
> global org.example.drools.service.DummyService dummyService;
> rule "will execute per each Measurement having ID color"
> no-loop
> when
> Measurement( id == "color", $colorVal : val )
> $var1: String() from dummyService.dummy("a");
> $var2: String() from dummyService.dummy("b");
> $var3: String() from dummyService.dummy("c");
> String() from dummyService.dummy($var1, $var2, $var3)
> then
> controlSet.add($colorVal);
> end{code}
> The _org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile_ fails with:
> {code:java}
> no suitable method found for from(org.drools.model.Global<org.example.drools.service.DummyService>,org.drools.model.Variable<java.lang.String>,org.drools.model.Variable<java.lang.String>,org.drools.model.Variable<java.lang.String>,rules.PFD.LambdaExtractorFD1FA74D5FA8CFA329D97E34A42287FA)
> [ERROR] method org.drools.model.DSL.<T>from(T) is not applicable
> [ERROR] (cannot infer type-variable(s) T
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<T>from(org.drools.model.Variable<T>) is not applicable
> [ERROR] (cannot infer type-variable(s) T
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<T>from(org.drools.model.functions.Function0<T>) is not applicable
> [ERROR] (cannot infer type-variable(s) T
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<T>from(org.drools.model.Variable<T>,org.drools.model.functions.Function1<T,?>) is not applicable
> [ERROR] (cannot infer type-variable(s) T
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<A,B>from(org.drools.model.Variable<A>,org.drools.model.Variable<B>,org.drools.model.functions.Function2<A,B,?>) is not applicable
> [ERROR] (cannot infer type-variable(s) A,B
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<A,B,C>from(org.drools.model.Variable<A>,org.drools.model.Variable<B>,org.drools.model.Variable<C>,org.drools.model.functions.Function3<A,B,C,?>) is not applicable
> [ERROR] (cannot infer type-variable(s) A,B,C
> [ERROR] (actual and formal argument lists differ in length)){code}
>
> So the DSL.from() cannot accept more than 2 variables.
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (DROOLS-5548) Model compiler cannot generate code for method calls using variable accessors
by Ciprian Chiru (Jira)
[ https://issues.redhat.com/browse/DROOLS-5548?page=com.atlassian.jira.plug... ]
Ciprian Chiru updated DROOLS-5548:
----------------------------------
Description:
Given the example rule below (based on the drools example rule)
{code:java}
global java.util.Set controlSet;
declare A
x: String
end
declare B
a: A
end
function String dummyFunction(B b) {
return "test";
}
rule "will execute per each Measurement having ID color"
no-loop
when
Measurement( id == "color", $colorVal : val )
$b: B()
$val: String() from dummyFunction($b.a)
then
controlSet.add($colorVal);
end{code}
When compiling the rule with _kie-maven-plugin_ it fails with :
{noformat}
...target/generated-sources/drools-model-compiler/main/java/rules/Rules5937a2896da74f01bfa36d294bcf0858RuleMethods0.java:[32,107] cannot find symbol
[ERROR] symbol: variable $b
[ERROR] location: class rules.Rules5937a2896da74f01bfa36d294bcf0858RuleMethods0{noformat}
It transpiles and compiles fine with:
{code:java}
$val: String() from dummyFunction($b){code}
This can probably be reproduced on all version.
It works when the rules are not pre-compiled.
was:
Given the example rule below (based on the drools example rule)
{code:java}
global java.util.Set controlSet;
declare A
x: String
end
declare B
a: A
end
function String dummyFunction(B b) {
return "test";
}
rule "will execute per each Measurement having ID color"
no-loop
when
Measurement( id == "color", $colorVal : val )
$b: B()
$val: String() from dummyFunction($b.a)
then
controlSet.add($colorVal);
end{code}
When compiling the rule with _kie-maven-plugin_ it fails with :
{noformat}
...target/generated-sources/drools-model-compiler/main/java/rules/Rules5937a2896da74f01bfa36d294bcf0858RuleMethods0.java:[32,107] cannot find symbol
[ERROR] symbol: variable $b
[ERROR] location: class rules.Rules5937a2896da74f01bfa36d294bcf0858RuleMethods0{noformat}
It transpiles and compiles fine with:
{code:java}
$val: String() from dummyFunction($b){code}
This can probably be reproduced on all version.
> Model compiler cannot generate code for method calls using variable accessors
> -----------------------------------------------------------------------------
>
> Key: DROOLS-5548
> URL: https://issues.redhat.com/browse/DROOLS-5548
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.31.0.Final, 7.32.0.Final, 7.33.0.Final, 7.34.0.Final, 7.35.0.Final, 7.36.0.Final, 7.37.0.Final, 7.38.0.Final, 7.39.0.Final, 7.40.0.Final
> Reporter: Ciprian Chiru
> Assignee: Luca Molteni
> Priority: Major
>
> Given the example rule below (based on the drools example rule)
>
> {code:java}
> global java.util.Set controlSet;
> declare A
> x: String
> end
> declare B
> a: A
> end
> function String dummyFunction(B b) {
> return "test";
> }
> rule "will execute per each Measurement having ID color"
> no-loop
> when
> Measurement( id == "color", $colorVal : val )
> $b: B()
> $val: String() from dummyFunction($b.a)
> then
> controlSet.add($colorVal);
> end{code}
>
>
> When compiling the rule with _kie-maven-plugin_ it fails with :
> {noformat}
> ...target/generated-sources/drools-model-compiler/main/java/rules/Rules5937a2896da74f01bfa36d294bcf0858RuleMethods0.java:[32,107] cannot find symbol
> [ERROR] symbol: variable $b
> [ERROR] location: class rules.Rules5937a2896da74f01bfa36d294bcf0858RuleMethods0{noformat}
> It transpiles and compiles fine with:
> {code:java}
> $val: String() from dummyFunction($b){code}
>
> This can probably be reproduced on all version.
> It works when the rules are not pre-compiled.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (DROOLS-5549) Drools model compilation fails when using object builders within method calls
by Ciprian Chiru (Jira)
Ciprian Chiru created DROOLS-5549:
-------------------------------------
Summary: Drools model compilation fails when using object builders within method calls
Key: DROOLS-5549
URL: https://issues.redhat.com/browse/DROOLS-5549
Project: Drools
Issue Type: Bug
Affects Versions: 7.40.0.Final, 7.39.0.Final, 7.38.0.Final, 7.37.0.Final, 7.36.0.Final, 7.35.0.Final, 7.34.0.Final, 7.33.0.Final, 7.32.0.Final, 7.31.0.Final
Reporter: Ciprian Chiru
Assignee: Mario Fusco
Given the example rule below:
{code:java}
import org.example.drools.model.*;
import java.util.Map;
global java.util.Set controlSet;
function String dummyFunction(Map m) {
return "test";
}
rule "will execute per each Measurement having ID color"
no-loop
when
Measurement( id == "color", $colorVal : val )
$val: String() from dummyFunction(Map.entry($colorVal))
then
controlSet.add($colorVal);
end{code}
compiling the rule with kie-maven-plugin, it throws the error:
{code:java}
...target/generated-sources/drools-model-compiler/main/java/rules/Rules57a04348fad44377b9eacd9bb5741999RuleMethods0.java:[30,117] cannot find symbol
[ERROR] symbol: variable $colorVal
[ERROR] location: class rules.Rules57a04348fad44377b9eacd9bb5741999RuleMethods0{code}
Same code works fine if the rules are not pre-compiled.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (DROOLS-5548) Model compiler cannot generate code for method calls using variable accessors
by Ciprian Chiru (Jira)
Ciprian Chiru created DROOLS-5548:
-------------------------------------
Summary: Model compiler cannot generate code for method calls using variable accessors
Key: DROOLS-5548
URL: https://issues.redhat.com/browse/DROOLS-5548
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.40.0.Final, 7.39.0.Final, 7.38.0.Final, 7.37.0.Final, 7.36.0.Final, 7.35.0.Final, 7.34.0.Final, 7.33.0.Final, 7.32.0.Final, 7.31.0.Final
Reporter: Ciprian Chiru
Assignee: Luca Molteni
Given the example rule below (based on the drools example rule)
{code:java}
global java.util.Set controlSet;
declare A
x: String
end
declare B
a: A
end
function String dummyFunction(B b) {
return "test";
}
rule "will execute per each Measurement having ID color"
no-loop
when
Measurement( id == "color", $colorVal : val )
$b: B()
$val: String() from dummyFunction($b.a)
then
controlSet.add($colorVal);
end{code}
When compiling the rule with _kie-maven-plugin_ it fails with :
{noformat}
...target/generated-sources/drools-model-compiler/main/java/rules/Rules5937a2896da74f01bfa36d294bcf0858RuleMethods0.java:[32,107] cannot find symbol
[ERROR] symbol: variable $b
[ERROR] location: class rules.Rules5937a2896da74f01bfa36d294bcf0858RuleMethods0{noformat}
It transpiles and compiles fine with:
{code:java}
$val: String() from dummyFunction($b){code}
This can probably be reproduced on all version.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (JGRP-2495) A variant of RELAY2.printTopology() returning a member list
by Bela Ban (Jira)
[ https://issues.redhat.com/browse/JGRP-2495?page=com.atlassian.jira.plugin... ]
Bela Ban commented on JGRP-2495:
--------------------------------
So if we send a 'multicast' request to the site master of a given site, then it can forward that message to all members of that site. On reception, every member can reply to the original sender. But, as you mentioned, it is *not* possible to send a message to an individual member of a different site directly.
Closing this request, thanks,
> A variant of RELAY2.printTopology() returning a member list
> -----------------------------------------------------------
>
> Key: JGRP-2495
> URL: https://issues.redhat.com/browse/JGRP-2495
> Project: JGroups
> Issue Type: Enhancement
> Affects Versions: 4.0.24
> Reporter: S Pokutniy
> Assignee: Bela Ban
> Priority: Minor
>
> It would be great if there existed a variant of A variant of RELAY2.printTopology() function, returning a list of all members with their logical names and physical addresses. As of now printTopology(boolean) returns a string with all members. Even though the members of one site do not know about the members of the other site, it would still be great to be able to show the list of all members connected over the bridge, be it for demonstration or monitoring purpose.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months