[rules-users] Some Questions related to execution

Wolfgang Laun wolfgang.laun at gmail.com
Fri Feb 11 03:37:00 EST 2011


On 11 February 2011 00:14, kashif10 <kash452 at yahoo.com> wrote:

>
>
> 1) If I have a Rule definition
>
> when
> #conditions
>
>  Person( gender  == "Female")
>  or
>  Procedure( needToDone == "ABC"))
>
>
> then
> resultIds.add("id_1000");
>
>
> Is it not short circuit If first condiiton matches?
> I get twice time "id_1000" in resultIds.
>
>
"or" results in two distinct rules, in your case one with Person(...) and
the other one with Procedure(...). This the common standard interpretation
in Rule Based Systems.


>
> 2) How can I chekc the multiple existence
> For Example:
>
> How can I chekc that multiple instances of Procddure have alredayDone= "ABC
> "
>
> Rule Definition only chekc once:
> Procedure (alredayDone == "ABC")
>


Number( intValue > 1 ) from accumulate( Procedure (alredayDone == "ABC"),
count( 1 ) )

Check the documentation on this and also on "from collect" for variations.

-W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110211/825761ce/attachment.html 


More information about the rules-users mailing list