[rules-users] inline eval vs comparing booleans

Edson Tirelli tirelli at post.com
Wed Jun 2 08:51:59 EDT 2010


    The sentence "is cached" does not completely reflect what happens. Just
think that if an inline eval is not constant over time (except for cases
where a modify is called on the pattern itself), it will generate
inconsistencies on the kbase.

    Regarding the second question, regular constraints are much more
efficient than evals.

    Edson

2010/6/2 evertp <evert.penninckx at gmail.com>

>
> Hi
>
> In the JBoss Rules 5.0 dev guide I read the statement:
>
> When comparing inline eval with standard eval, we can see that they both
> must
> return true or false. However, inline eval must be a time-constant
> expression.
> It is evaluated only once and then it is cached by Drools
>
> 1. Can I assume that the caching lasts until the session is disposed of?
>
> 2. Is there a difference between the conditions Fact( eval(isValid) ) and
> Fact( isValid == true ) or are they evaluated in the same way?
>
>
>
>
> -Evert
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/inline-eval-vs-comparing-booleans-tp864103p864103.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100602/2f110da8/attachment.html 


More information about the rules-users mailing list