Hi,
Use lock-on-active true in when condition,
This will resolve this issue
Thanks
Ganesh Neelekani
--
View this message in context:
http://drools.46999.n3.nabble.com/Adding-eval-on-rule-cause-it-to-run-in-infinite-loop-tp4029966p4030007.html
Sent from the Drools: User forum mailing list
Davide is correct, for our analysis to work, the constraint must not be inside
an eval, and any constraint that does not start with a field name is internally
rewritten as an eval.
Mark
On 11 Jun 2014, at 18:48, Davide Sottara dso...@gmail.com wrote:
I think I know what is happening here.
I
for this Drools Fact Type:
/*
declare DvFacts0
@propertyReactive
IsNUMERIC: Double
condIsNUMERIC: Double
end*/
I have this rule:
/*rule 1
salience -1
agenda-group agenda1
when
$condIsNUMERIC: DvFacts0(eval(condIsNUMERIC == null ) )
Add
no-loop true
on the line after the rule directive.
rule 1
no-loop true
Regards
Chiddu
On Wed, Jun 11, 2014 at 2:05 PM, brachi brach...@sapiens.com wrote:
for this Drools Fact Type:
/*
declare DvFacts0
@propertyReactive
IsNUMERIC: Double
condIsNUMERIC:
Wrapping a constraint into eval (for which there's absolutely no need)
hides the visibility of the attribute condIsNUMERIC to the observer that
would avoid the reactivation.
-W
On 11/06/2014, brachi brach...@sapiens.com wrote:
for this Drools Fact Type:
/*
declare DvFacts0
@propertyReactive
so, will no-loop help?
is eval also override this attribute?
--
View this message in context:
http://drools.46999.n3.nabble.com/Adding-eval-on-rule-cause-it-to-run-in-infinite-loop-tp4029966p4029971.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
The whole point of @propertyReactive is to avoid no-loop where possible.
What Wolfgang was trying to say is that there is no need to use the eval:
just write
DvFacts0( condIsNUMERIC == null )
and the @propertyReactivity will work
Davide
On 06/11/2014 10:40 AM, brachi wrote:
so, will no-loop
I need the eval.
I have some rules that doesn't hit correctly, just if I put eval around the
condition.
but eval makes the rules to run in an infinite loop.
--
View this message in context:
Could you please show the conditions for which you need the eval?
And which version are you using? As far as I know, eval is rewritten and
removed internally in latest versions, so there shouldn't be a difference.
On 06/11/2014 12:34 PM, brachi wrote:
I need the eval.
I have some rules that
What is the issue in using the no-loop directive?
Regards
Chiddu
On Wed, Jun 11, 2014 at 5:09 PM, Davide Sottara dso...@gmail.com wrote:
Could you please show the conditions for which you need the eval?
And which version are you using? As far as I know, eval is rewritten and
removed
On 11/06/2014, Chidambaran Subramanian chi...@gmail.com wrote:
What is the issue in using the no-loop directive?
Expert manual, Subsection Fine grained property change listeners
-W
Regards
Chiddu
On Wed, Jun 11, 2014 at 5:09 PM, Davide Sottara dso...@gmail.com wrote:
Could you please
example of rule that doesn't work without eval:
/*rule 1
salience -1
agenda-group agenda1
when
$conclusion: supportFT()
then
if($conclusion.getValue()==null){
modify($conclusion) { setValue(new ArrayList())};
}
example of rule that doesn't work without eval:
/*rule 1
salience -1
agenda-group agenda1
when
$conclusion: supportFT()
then
if($conclusion.getValue()==null){
modify($conclusion) { setValue(new ArrayList())};
On 11/06/2014, brachi brach...@sapiens.com wrote:
example of rule that doesn't work without eval:
/*rule 1
salience -1
agenda-group agenda1
when
$conclusion: supportFT()
Where's the eval?
then
if($conclusion.getValue()==null){
This example describes a case using function in the constraint
(Operators.containsAny) and pass a Fact Type that was changed in a previous
rule.
you are right that I can use the drools operator IN (...), but I wanted to
use function in the example, because that is the case that rules don't hit.
I
I think I know what is happening here.
I assume your supportFT class is @propertyReactive.
(btw, you should follow bean conventions and capitalize class names)
Looking at Rule 1, you don't set the value directly, but you do it through
a modify. Your rule 2, which checks for the value, uses the
16 matches
Mail list logo