[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)
5 years, 9 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)
5 years, 9 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)
5 years, 9 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)
5 years, 9 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 resolved JGRP-2495.
----------------------------
Resolution: Won't Fix
> 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)
5 years, 9 months