[JBoss JIRA] (DROOLS-627) Rule with two accumulate followed by object type selection fail to fire rule
by Anantjot Anand (JIRA)
[ https://issues.jboss.org/browse/DROOLS-627?page=com.atlassian.jira.plugin... ]
Anantjot Anand updated DROOLS-627:
----------------------------------
Description:
A rule with two accumulate function followed by Type(true) select fails to fire the rule.
please note removing the second aggregation makes the Rule R1 fire.
import java.lang.*;
import java.util.*;
import com.test.unittest.TestTwoAccumulateEval.TypeA;
import com.test.unittest.TestTwoAccumulateEval.TypeB;
import com.test.unittest.TestTwoAccumulateEval.TypeC;
import com.test.unittest.TestTwoAccumulateEval.TypeD;
import com.test.unittest.TestTwoAccumulateEval.TypeDD;
rule R0
dialect "java"
when
$a : TypeA( )
$b : TypeB( parentId == $a.id)
$c : TypeC( parentId == $b.id )
$d : TypeD( parentId == $c.id, firings not contains "Rule R0 Fired" )
then
System.out.println("Rule R0 Fired");
$d.setValue(1.0);
$d.getFirings().add("Rule R0 Fired");
update($d);
end
rule R1
dialect "java"
when
$a : TypeA( )
$b : TypeB( parentId == $a.id)
$c : TypeC( parentId == $b.id, firings not contains "Rule R1 Fired" )
$d : TypeD( parentId == $c.id)
// Aggregate function [sum] creates a separate context
$sumOfAll_1 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
$a_C1 : TypeA( )
and
$b_C1 : TypeB( parentId == $a_C1.id)
and
$c_C1 : TypeC( parentId == $b_C1.id )
and
$d_C1 : TypeD( parentId == $c_C1.id , $value_C1 : value , value != 0 )
;sum($value_C1))
// end of sum aggregation
// Aggregate function [sum] creates a separate context
$sumOfAll_2 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
$a_C2 : TypeA( )
and
$b_C2 : TypeB( parentId == $a_C2.id)
and
$c_C2 : TypeC( parentId == $b_C2.id )
and
$dd_C2 : TypeDD( parentId == $c_C2.id , $value_C2 : value , value != 0 )
;sum($value_C2))
// end of sum aggregation
//eval(($sumOfAll_1 + $sumOfAll_2) > 0)
//eval returns true however TypeA(true) evaluates to false...removing second aggregate
//makes TypeA works
TypeA(eval(($sumOfAll_1 + $sumOfAll_2) > 0))
then
System.out.println("Rule R1 Fired");
$c.getFirings().add("Rule R1 Fired");
update($c);
end
was:
A rule with two accumulate function followed by Type(true) select fails to fire the rule.
import java.lang.*;
import java.util.*;
import com.test.unittest.TestTwoAccumulateEval.TypeA;
import com.test.unittest.TestTwoAccumulateEval.TypeB;
import com.test.unittest.TestTwoAccumulateEval.TypeC;
import com.test.unittest.TestTwoAccumulateEval.TypeD;
import com.test.unittest.TestTwoAccumulateEval.TypeDD;
rule R0
dialect "java"
when
$a : TypeA( )
$b : TypeB( parentId == $a.id)
$c : TypeC( parentId == $b.id )
$d : TypeD( parentId == $c.id, firings not contains "Rule R0 Fired" )
then
System.out.println("Rule R0 Fired");
$d.setValue(1.0);
$d.getFirings().add("Rule R0 Fired");
update($d);
end
rule R1
dialect "java"
when
$a : TypeA( )
$b : TypeB( parentId == $a.id)
$c : TypeC( parentId == $b.id, firings not contains "Rule R1 Fired" )
$d : TypeD( parentId == $c.id)
// Aggregate function [sum] creates a separate context
$sumOfAll_1 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
$a_C1 : TypeA( )
and
$b_C1 : TypeB( parentId == $a_C1.id)
and
$c_C1 : TypeC( parentId == $b_C1.id )
and
$d_C1 : TypeD( parentId == $c_C1.id , $value_C1 : value , value != 0 )
;sum($value_C1))
// end of sum aggregation
// Aggregate function [sum] creates a separate context
$sumOfAll_2 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
$a_C2 : TypeA( )
and
$b_C2 : TypeB( parentId == $a_C2.id)
and
$c_C2 : TypeC( parentId == $b_C2.id )
and
$dd_C2 : TypeDD( parentId == $c_C2.id , $value_C2 : value , value != 0 )
;sum($value_C2))
// end of sum aggregation
//eval(($sumOfAll_1 + $sumOfAll_2) > 0)
//eval returns true however TypeA(true) evaluates to false...removing second aggregate
//makes TypeA works
TypeA(eval(($sumOfAll_1 + $sumOfAll_2) > 0))
then
System.out.println("Rule R1 Fired");
$c.getFirings().add("Rule R1 Fired");
update($c);
end
> Rule with two accumulate followed by object type selection fail to fire rule
> ----------------------------------------------------------------------------
>
> Key: DROOLS-627
> URL: https://issues.jboss.org/browse/DROOLS-627
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.1.0.Final, 6.2.0.Beta1
> Reporter: Anantjot Anand
> Assignee: Mark Proctor
> Attachments: TestTwoAccumulateEval.java
>
>
> A rule with two accumulate function followed by Type(true) select fails to fire the rule.
> please note removing the second aggregation makes the Rule R1 fire.
> import java.lang.*;
> import java.util.*;
> import com.test.unittest.TestTwoAccumulateEval.TypeA;
> import com.test.unittest.TestTwoAccumulateEval.TypeB;
> import com.test.unittest.TestTwoAccumulateEval.TypeC;
> import com.test.unittest.TestTwoAccumulateEval.TypeD;
> import com.test.unittest.TestTwoAccumulateEval.TypeDD;
> rule R0
> dialect "java"
> when
> $a : TypeA( )
> $b : TypeB( parentId == $a.id)
> $c : TypeC( parentId == $b.id )
> $d : TypeD( parentId == $c.id, firings not contains "Rule R0 Fired" )
> then
> System.out.println("Rule R0 Fired");
> $d.setValue(1.0);
> $d.getFirings().add("Rule R0 Fired");
> update($d);
> end
> rule R1
> dialect "java"
> when
> $a : TypeA( )
> $b : TypeB( parentId == $a.id)
> $c : TypeC( parentId == $b.id, firings not contains "Rule R1 Fired" )
> $d : TypeD( parentId == $c.id)
> // Aggregate function [sum] creates a separate context
> $sumOfAll_1 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
> $a_C1 : TypeA( )
>
> and
> $b_C1 : TypeB( parentId == $a_C1.id)
>
> and
> $c_C1 : TypeC( parentId == $b_C1.id )
>
> and
> $d_C1 : TypeD( parentId == $c_C1.id , $value_C1 : value , value != 0 )
> ;sum($value_C1))
> // end of sum aggregation
>
> // Aggregate function [sum] creates a separate context
> $sumOfAll_2 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
> $a_C2 : TypeA( )
>
> and
> $b_C2 : TypeB( parentId == $a_C2.id)
>
> and
> $c_C2 : TypeC( parentId == $b_C2.id )
>
> and
> $dd_C2 : TypeDD( parentId == $c_C2.id , $value_C2 : value , value != 0 )
> ;sum($value_C2))
> // end of sum aggregation
> //eval(($sumOfAll_1 + $sumOfAll_2) > 0)
> //eval returns true however TypeA(true) evaluates to false...removing second aggregate
> //makes TypeA works
> TypeA(eval(($sumOfAll_1 + $sumOfAll_2) > 0))
> then
> System.out.println("Rule R1 Fired");
> $c.getFirings().add("Rule R1 Fired");
> update($c);
> end
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (DROOLS-627) Rule with two accumulate followed by object type selection fail to fire rule
by Anantjot Anand (JIRA)
[ https://issues.jboss.org/browse/DROOLS-627?page=com.atlassian.jira.plugin... ]
Anantjot Anand updated DROOLS-627:
----------------------------------
Attachment: TestTwoAccumulateEval.java
> Rule with two accumulate followed by object type selection fail to fire rule
> ----------------------------------------------------------------------------
>
> Key: DROOLS-627
> URL: https://issues.jboss.org/browse/DROOLS-627
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.1.0.Final, 6.2.0.Beta1
> Reporter: Anantjot Anand
> Assignee: Mark Proctor
> Attachments: TestTwoAccumulateEval.java
>
>
> A rule with two accumulate function followed by Type(true) select fails to fire the rule.
> import java.lang.*;
> import java.util.*;
> import com.test.unittest.TestTwoAccumulateEval.TypeA;
> import com.test.unittest.TestTwoAccumulateEval.TypeB;
> import com.test.unittest.TestTwoAccumulateEval.TypeC;
> import com.test.unittest.TestTwoAccumulateEval.TypeD;
> import com.test.unittest.TestTwoAccumulateEval.TypeDD;
> rule R0
> dialect "java"
> when
> $a : TypeA( )
> $b : TypeB( parentId == $a.id)
> $c : TypeC( parentId == $b.id )
> $d : TypeD( parentId == $c.id, firings not contains "Rule R0 Fired" )
> then
> System.out.println("Rule R0 Fired");
> $d.setValue(1.0);
> $d.getFirings().add("Rule R0 Fired");
> update($d);
> end
> rule R1
> dialect "java"
> when
> $a : TypeA( )
> $b : TypeB( parentId == $a.id)
> $c : TypeC( parentId == $b.id, firings not contains "Rule R1 Fired" )
> $d : TypeD( parentId == $c.id)
> // Aggregate function [sum] creates a separate context
> $sumOfAll_1 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
> $a_C1 : TypeA( )
>
> and
> $b_C1 : TypeB( parentId == $a_C1.id)
>
> and
> $c_C1 : TypeC( parentId == $b_C1.id )
>
> and
> $d_C1 : TypeD( parentId == $c_C1.id , $value_C1 : value , value != 0 )
> ;sum($value_C1))
> // end of sum aggregation
>
> // Aggregate function [sum] creates a separate context
> $sumOfAll_2 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
> $a_C2 : TypeA( )
>
> and
> $b_C2 : TypeB( parentId == $a_C2.id)
>
> and
> $c_C2 : TypeC( parentId == $b_C2.id )
>
> and
> $dd_C2 : TypeDD( parentId == $c_C2.id , $value_C2 : value , value != 0 )
> ;sum($value_C2))
> // end of sum aggregation
> //eval(($sumOfAll_1 + $sumOfAll_2) > 0)
> //eval returns true however TypeA(true) evaluates to false...removing second aggregate
> //makes TypeA works
> TypeA(eval(($sumOfAll_1 + $sumOfAll_2) > 0))
> then
> System.out.println("Rule R1 Fired");
> $c.getFirings().add("Rule R1 Fired");
> update($c);
> end
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (DROOLS-627) Rule with two accumulate followed by object type selection fail to fire rule
by Anantjot Anand (JIRA)
Anantjot Anand created DROOLS-627:
-------------------------------------
Summary: Rule with two accumulate followed by object type selection fail to fire rule
Key: DROOLS-627
URL: https://issues.jboss.org/browse/DROOLS-627
Project: Drools
Issue Type: Bug
Affects Versions: 6.2.0.Beta1, 6.1.0.Final
Reporter: Anantjot Anand
Assignee: Mark Proctor
A rule with two accumulate function followed by Type(true) select fails to fire the rule.
import java.lang.*;
import java.util.*;
import com.test.unittest.TestTwoAccumulateEval.TypeA;
import com.test.unittest.TestTwoAccumulateEval.TypeB;
import com.test.unittest.TestTwoAccumulateEval.TypeC;
import com.test.unittest.TestTwoAccumulateEval.TypeD;
import com.test.unittest.TestTwoAccumulateEval.TypeDD;
rule R0
dialect "java"
when
$a : TypeA( )
$b : TypeB( parentId == $a.id)
$c : TypeC( parentId == $b.id )
$d : TypeD( parentId == $c.id, firings not contains "Rule R0 Fired" )
then
System.out.println("Rule R0 Fired");
$d.setValue(1.0);
$d.getFirings().add("Rule R0 Fired");
update($d);
end
rule R1
dialect "java"
when
$a : TypeA( )
$b : TypeB( parentId == $a.id)
$c : TypeC( parentId == $b.id, firings not contains "Rule R1 Fired" )
$d : TypeD( parentId == $c.id)
// Aggregate function [sum] creates a separate context
$sumOfAll_1 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
$a_C1 : TypeA( )
and
$b_C1 : TypeB( parentId == $a_C1.id)
and
$c_C1 : TypeC( parentId == $b_C1.id )
and
$d_C1 : TypeD( parentId == $c_C1.id , $value_C1 : value , value != 0 )
;sum($value_C1))
// end of sum aggregation
// Aggregate function [sum] creates a separate context
$sumOfAll_2 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
$a_C2 : TypeA( )
and
$b_C2 : TypeB( parentId == $a_C2.id)
and
$c_C2 : TypeC( parentId == $b_C2.id )
and
$dd_C2 : TypeDD( parentId == $c_C2.id , $value_C2 : value , value != 0 )
;sum($value_C2))
// end of sum aggregation
//eval(($sumOfAll_1 + $sumOfAll_2) > 0)
//eval returns true however TypeA(true) evaluates to false...removing second aggregate
//makes TypeA works
TypeA(eval(($sumOfAll_1 + $sumOfAll_2) > 0))
then
System.out.println("Rule R1 Fired");
$c.getFirings().add("Rule R1 Fired");
update($c);
end
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (ELY-88) Command line utilities
by David Lloyd (JIRA)
David Lloyd created ELY-88:
------------------------------
Summary: Command line utilities
Key: ELY-88
URL: https://issues.jboss.org/browse/ELY-88
Project: WildFly Elytron
Issue Type: Feature Request
Reporter: David Lloyd
Assignee: Darran Lofthouse
We should provide easy-to-use command line tools from the Elytron JAR as a main class that provide useful functions to users like:
* Creating password hashes
* Creating certificates and certificate requests
* Creating key pairs of various types
* Managing key stores (everything keytool does)
* Get the library version
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (ELY-88) Command line utilities
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/ELY-88?page=com.atlassian.jira.plugin.sys... ]
David Lloyd updated ELY-88:
---------------------------
Assignee: (was: Darran Lofthouse)
> Command line utilities
> ----------------------
>
> Key: ELY-88
> URL: https://issues.jboss.org/browse/ELY-88
> Project: WildFly Elytron
> Issue Type: Feature Request
> Reporter: David Lloyd
>
> We should provide easy-to-use command line tools from the Elytron JAR as a main class that provide useful functions to users like:
> * Creating password hashes
> * Creating certificates and certificate requests
> * Creating key pairs of various types
> * Managing key stores (everything keytool does)
> * Get the library version
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3938) Allow server to be named and display in admin console's title
by Paul Benedict (JIRA)
[ https://issues.jboss.org/browse/WFLY-3938?page=com.atlassian.jira.plugin.... ]
Paul Benedict commented on WFLY-3938:
-------------------------------------
Using "name" from <server> would be fine by me.
> Allow server to be named and display in admin console's title
> -------------------------------------------------------------
>
> Key: WFLY-3938
> URL: https://issues.jboss.org/browse/WFLY-3938
> Project: WildFly
> Issue Type: Feature Request
> Components: Web Console
> Affects Versions: 8.1.0.Final
> Reporter: Paul Benedict
> Assignee: Heiko Braun
> Priority: Minor
>
> I frequently have several JBoss Management web consoles open for different environments. It's really not possible to look at my open browser windows and figure out which belongs to which environment.
> I would like to propose a new attribute in <server> that allows me to specify the title of the server. This title would display as part of the console's <title> tag in HTML. Then I can easily manage multiple consoles at once.
> Example:
> {code}
> <server name="daclient" xmlns="urn:jboss:domain:2.1" title="Localhost Development">
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3938) Allow server to be named and display in admin console's title
by Heiko Braun (JIRA)
[ https://issues.jboss.org/browse/WFLY-3938?page=com.atlassian.jira.plugin.... ]
Heiko Braun edited comment on WFLY-3938 at 10/6/14 1:43 PM:
------------------------------------------------------------
I can understand the use case and it make complete sense. But wouldn't the actual server name be sufficient? Why do you think do we need an extra title attribute?
was (Author: heiko.braun):
I can understand the use case and make complete sense. But wouldn't the actual server name be sufficient? Why do you think do we need an extra title attribute?
> Allow server to be named and display in admin console's title
> -------------------------------------------------------------
>
> Key: WFLY-3938
> URL: https://issues.jboss.org/browse/WFLY-3938
> Project: WildFly
> Issue Type: Feature Request
> Components: Web Console
> Affects Versions: 8.1.0.Final
> Reporter: Paul Benedict
> Assignee: Heiko Braun
> Priority: Minor
>
> I frequently have several JBoss Management web consoles open for different environments. It's really not possible to look at my open browser windows and figure out which belongs to which environment.
> I would like to propose a new attribute in <server> that allows me to specify the title of the server. This title would display as part of the console's <title> tag in HTML. Then I can easily manage multiple consoles at once.
> Example:
> {code}
> <server name="daclient" xmlns="urn:jboss:domain:2.1" title="Localhost Development">
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3938) Allow server to be named and display in admin console's title
by Heiko Braun (JIRA)
[ https://issues.jboss.org/browse/WFLY-3938?page=com.atlassian.jira.plugin.... ]
Heiko Braun commented on WFLY-3938:
-----------------------------------
I can understand the use case and make complete sense. But wouldn't the actual server name be sufficient? Why do you think do we need an extra title attribute?
> Allow server to be named and display in admin console's title
> -------------------------------------------------------------
>
> Key: WFLY-3938
> URL: https://issues.jboss.org/browse/WFLY-3938
> Project: WildFly
> Issue Type: Feature Request
> Components: Web Console
> Affects Versions: 8.1.0.Final
> Reporter: Paul Benedict
> Assignee: Heiko Braun
> Priority: Minor
>
> I frequently have several JBoss Management web consoles open for different environments. It's really not possible to look at my open browser windows and figure out which belongs to which environment.
> I would like to propose a new attribute in <server> that allows me to specify the title of the server. This title would display as part of the console's <title> tag in HTML. Then I can easily manage multiple consoles at once.
> Example:
> {code}
> <server name="daclient" xmlns="urn:jboss:domain:2.1" title="Localhost Development">
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3938) Allow server to be named and display in admin console's title
by Paul Benedict (JIRA)
Paul Benedict created WFLY-3938:
-----------------------------------
Summary: Allow server to be named and display in admin console's title
Key: WFLY-3938
URL: https://issues.jboss.org/browse/WFLY-3938
Project: WildFly
Issue Type: Feature Request
Components: Web Console
Affects Versions: 8.1.0.Final
Reporter: Paul Benedict
Assignee: Heiko Braun
Priority: Minor
I frequently have several JBoss Management web consoles open for different environments. It's really not possible to look at my open browser windows and figure out which belongs to which environment.
I would like to propose a new attribute in <server> that allows me to specify the title of the server. This title would display as part of the console's <title> tag in HTML. Then I can easily manage multiple consoles at once.
Example:
{code}
<server name="daclient" xmlns="urn:jboss:domain:2.1" title="Localhost Development">
{code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years