[JBoss JIRA] (DROOLS-5553) In DMNContextFPAImpl getMetadata returns always a new object
by Jacopo Rota (Jira)
Jacopo Rota created DROOLS-5553:
-----------------------------------
Summary: In DMNContextFPAImpl getMetadata returns always a new object
Key: DROOLS-5553
URL: https://issues.redhat.com/browse/DROOLS-5553
Project: Drools
Issue Type: Bug
Reporter: Jacopo Rota
Assignee: Jacopo Rota
Since the method getMetadata in DMNContextFPAImpl is returning every time a new object, the consumer that is setting a property in the metadata (like the kogito tracing addon that is storing the execution id) can not retrieve it back.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 5 months
[JBoss JIRA] (DROOLS-5552) An accumulate with more than one binding is wrongly generated in the executable model
by Martin Weiler (Jira)
Martin Weiler created DROOLS-5552:
-------------------------------------
Summary: An accumulate with more than one binding is wrongly generated in the executable model
Key: DROOLS-5552
URL: https://issues.redhat.com/browse/DROOLS-5552
Project: Drools
Issue Type: Bug
Reporter: Martin Weiler
Assignee: Mario Fusco
Reproducer
{code:java}
@Test
public void testAccumulateWithManyBindings() {
String str =
"import " + Person.class.getCanonicalName() + ";\n" +
"rule R when\n" +
" accumulate (\n" +
" Person($age : age, $name : name), $max : max( $name.length() ) " +
" )" +
"then\n" +
" insert($max);\n" +
"end";
KieSession ksession = getKieSession( str );
ksession.insert( new Person( "Mario", 40 ) );
ksession.insert( new Person( "Mark", 40 ) );
ksession.insert( new Person( "Luca", 40 ) );
ksession.fireAllRules();
List<Number> results = getObjectsIntoList(ksession, Number.class);
assertEquals(1, results.size());
assertEquals(5, results.get(0).intValue());
}{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 5 months
[JBoss JIRA] (DROOLS-5548) Model compiler cannot generate code for method calls using variable accessors
by Luca Molteni (Jira)
[ https://issues.redhat.com/browse/DROOLS-5548?page=com.atlassian.jira.plug... ]
Luca Molteni updated DROOLS-5548:
---------------------------------
Sprint: 2020 Week 31-33 (from Jul 27)
> 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, 5 months
[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)
5 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)
5 years, 5 months