[rules-users] drl's and silent failures

Edson Tirelli ed.tirelli at gmail.com
Thu Apr 8 09:24:08 EDT 2010


   Hi Barry,

   I will look into that. Did you opened a JIRA? Which dialect are you
using, java or mvel?

   Edson

2010/4/7 Barry Kaplan <groups1 at memelet.com>

>
> ** warning: This is a rant, but it just might save you some head scratching
> if you run into these issues **
>
> I really hate writing rules. Not, well not rules, but rules in the DRL
> language. There are so many edge conditions that fail silently. Here just
> two from today:
>
> ...
> then
>   retract(f1) // some comment
>   retract(f2)
> end
>
> In the above retract(f2) will not be invoke. No message about any problems
> -- it just doesn't happen. Remove the comment and f2 is retracted.
>
> And, where 'ksession' is a global
>
> ...
> then
>   update(ksession.getFactHandle(f1), new MyF1(10, 10))
> end
>
> In this one the constructor used for MyF1 does not exists. No message, just
> silent failure. Change the rule to:
>
> ...
> then
>   MyF1 fi_new = MyF1(10, 10)
>   update(ksession.getFactHandle(f1), f1_new)
> end
>
> And now the error message about the missing constructor is produced.
>
> --
> View this message in context:
> http://n3.nabble.com/drl-s-and-silent-failures-tp704973p704973.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/20100408/254c5bae/attachment.html 


More information about the rules-users mailing list