[rules-users] rule error

Giovanni Motta mottagio at gmail.com
Wed Jun 16 04:26:22 EDT 2010


You have 2 options here:
status == “yes" *||* status == "no"
status == “yes" *||* == "no"

'or' connector is not applied on constraints, but on patterns.

Regards

2010/6/16 Fnu Mahalakshmi <FMahalakshmi at nyx.com>

>  Hi,
>
>
>
> I want to just depict ‘&&’ and ‘or’ in my rules and did as follows:
>
>
>
> *rule* "Update value”
>
> *no-loop* *true*
>
>       *when*
>
>             $y :Y(name != "")
>
>             $x: X(status != "")
>
>             $z : Z( y == $y, x == $X,(status == “yes" *or* status == "no"
> ))
>
>       *then*
>
>             *modify*($z){};
>
>
>
> end
>
>
>
> The above does not work. Is it not valid to write as above??
>
> How else can I depict “or” ? relation?
>
> *rule* "Update value"
>
> *no-loop* *true*
>
>       *when*
>
>             $y :Y(name != "")
>
>             $x: X(status != "")
>
>             $z : Z( y == $y, x == $X,(status == “yes" *, *status == "no"))
>
>       *then*
>
>             *modify*($z){
>
> setOutput($z)};
>
>
>
> end
>
>
>
>
>
> even this does not work.
>
>
>
> I also want to add all the values specific to this condition and just print
> them out in my output file.
>
> So I tried adding it to a list (which is done by setOutput().
>
> But here I keep getting multiple entries for the same value.
>
> For eg. {a,b,c } //are instances of type z
>
> They keep getting added again and again. Should it not process input only
> once????
>
>
>
>
>
> Please help.
>
>
>
> Thank you
>
> m
>
> ------------------------------
>
> *Please consider the environment before printing this email.*
>
> *Visit our website at http://www.nyse.com
> *****************************************************************************
>
> Note: The information contained in this message and any attachment to it is
> privileged, confidential and protected from disclosure. If the reader of
> this message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient, you are
> hereby notified that any dissemination, distribution or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, please notify the sender immediately by replying to
> the message, and please delete it from your system. Thank you. NYSE
> Euronext. *
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100616/5cc3ec0d/attachment.html 


More information about the rules-users mailing list