Mario Fusco created JBRULES-3686:
------------------------------------
Summary: Wrong type declartion initialization causes an infinite loop when
using property reactivity
Key: JBRULES-3686
URL:
https://issues.jboss.org/browse/JBRULES-3686
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Mario Fusco
Assignee: Mario Fusco
A drl like the following with DataSample being annotated as @PropertyReactive ends up in
an infinite loop even if it shouldn't.
{{
rule 'Init'
when
$m: Model()
then
System.out.println("Inserting a DataSample");
insert(new DataSample($m));
end
rule "Rule 1"
when
$m: Model()
$d: DataSample(model == $m)
then
System.out.println(drools.getRule().getName());
modify($d){
addValue(Parameter.PARAM_A, 10.0)
}
end
rule "Rule 2"
when
$m: Model()
$d: DataSample(model == $m, $v: values[Parameter.PARAM_A] > 9.0)
then
System.out.println(drools.getRule().getName());
modify($d){
addMessage("Hello")
}
end
rule "Data without messages"
salience -100
when
$m: Model()
$d: DataSample(model == $m, messaged == false)
then
System.out.println(drools.getRule().getName());
end
}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira