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  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 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 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:
> http://drools.46999.n3.nabble.com/Adding-eval-on-rule-cause-it-to-run-in-infinite-loop-tp4029966p4029979.html
> > Sent from the Drools: User forum mailing list archive at Nabble.com.
> > ___
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

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  wrote:

> 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 ) )
> $conclusion: DvFacts0( )
> then
> modify($conclusion){setIsNUMERIC(1.0)};
> end*/
>
> the rule hit just one time without the eval clause, adding the eval cause
> this rule to run in infinite loop.
> have an idea?
> put attention that I add  @propertyReactive on the DVFacts0 to avoid this.
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Adding-eval-on-rule-cause-it-to-run-in-infinite-loop-tp4029966.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] How do I access objects in a top level or condition?

2014-05-28 Thread Chidambaran Subramanian
rule "Test"
  dialect "mvel"
  when
( Customer( age == 50 ) or Deal( amount == 30 ) )
  then
Customer.setAge( "40" );
update( Customer );
Customer.setPlace( "Test" );
update( Customer );
end



Appreciate any help in this regard.

Regards
Chiddu
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Syntax Question on an or condition

2014-05-28 Thread Chidambaran Subramanian
rule "Test"
  dialect "mvel"
  when
( Customer( age == 50 ) or Deal( amount == 30 ) )
  then
Customer.setAge( "40" );
update( Customer );
Customer.setPlace( "Test" );
update( Customer );

end


How to do I tag both Customer and Deal on the 1st condition , to enable me
to
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users