[rules-users] modify and update is not working in the rule file

Wolfgang Laun wolfgang.laun at gmail.com
Fri Aug 17 10:21:10 EDT 2012


Hasn't this been answered only recently on this list?

1) For simple conditions, a rule negating the condition of your rule
will fire if the other one fails:

rule "a != b"
when
      test( a != "b" )
then
      //consequence
end

2) If you have rules extending each other, the first one not firing
contains the condition(s) that are not fulfilled.

3) An individual analysis of the attributes of a fact can be done,
collecting the conditions that are fulfilled. At the end of the
analysis, you either have the situation that all required attributes
are fulfilled (and you can execute the consequence) or not, and thus
you know what's missing.

-W


On 17/08/2012, Rana <ven12344 at yahoo.com> wrote:
> ok, thank you so much for your help. It works. Thanks.
>
> But one tough question for you.
>
> How can I know what was the reason a rule condition failed. Lets say
>
> rule
>   when
>      test( a == "b" )
>   then
>      //consequence
> end
>
> I want to know what caused the condition a=="b" to fail was the value of a
> is "b" or anything else. and I need to log this to a log file.
>
> Somebody told me that Verifier does the trick, but we need to add some
> custom rules to get to the values. I tried to google lot on this. But I
> never got anything which do what I want to do.
>
> Please help me on this.
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/modify-and-update-is-not-working-in-the-rule-file-tp4019158p4019245.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list