Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-12 Thread ganeshneelekani
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

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-12 Thread Mark Proctor
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

[rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread brachi
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 ) )

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread Chidambaran Subramanian
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:

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread Wolfgang Laun
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

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread brachi
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.

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread Davide Sottara
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

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread brachi
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:

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread Davide Sottara
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

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread Chidambaran Subramanian
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

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread Wolfgang Laun
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

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread brachi
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())}; }

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread brachi
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())};

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread Wolfgang Laun
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){

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread brachi
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

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread Davide Sottara
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