[
https://issues.jboss.org/browse/JBRULES-3686?page=com.atlassian.jira.plug...
]
Mario Fusco commented on JBRULES-3686:
--------------------------------------
The problem is caused by the new DataSample($m) statement in the consequence of the init
rule that causes an initialization of the DataSample type declaration without registering
it on the PackageRegistry
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
insert(new DataSample($m));
end
rule "Rule 1"
when
$m: Model()
$d: DataSample(model == $m)
then
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
modify($d){
addMessage("Hello")
}
end
rule "Data without messages"
salience -100
when
$m: Model()
$d: DataSample(model == $m, messaged == false)
then
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