<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>RE: [rules-users] variables in rules</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=2>Hi Mark.<BR>
<BR>
Could you please give me a pointer into some doc or sample code where this is being done? I couldn't find anything in there when I last looked.<BR>
<BR>
Thanks for you help so far! :-)<BR>
<BR>
--Arsalan<BR>
<BR>
-----Original Message-----<BR>
From: rules-users-bounces@lists.jboss.org on behalf of Mark Proctor<BR>
Sent: Mon 13-Aug-07 7:23 PM<BR>
To: Rules Users List<BR>
Subject: Re: [rules-users] variables in rules<BR>
<BR>
yes, you can do it in a consequence or from java land.<BR>
<BR>
Mark<BR>
Arsalan S. Zaidi wrote:<BR>
><BR>
> Hi Mark.<BR>
><BR>
> <BR>
><BR>
> Thanks for the quick reply! :-)<BR>
><BR>
> <BR>
><BR>
> About question no. 2, is there anyway to do something like that with<BR>
> Drools?<BR>
><BR>
> <BR>
><BR>
> Regards,<BR>
><BR>
> <BR>
><BR>
> --Arsalan<BR>
><BR>
> <BR>
><BR>
> ------------------------------------------------------------------------<BR>
><BR>
> *From:* rules-users-bounces@lists.jboss.org<BR>
> [<A HREF="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</A>] *On Behalf Of *Mark Proctor<BR>
> *Sent:* 13 August 2007 18:03<BR>
> *To:* Rules Users List<BR>
> *Subject:* Re: [rules-users] variables in rules<BR>
><BR>
> <BR>
><BR>
> yes you can use a variable, and no you cannot dynamically generate<BR>
> rules in an eval.<BR>
><BR>
> Mark<BR>
> Arsalan S. Zaidi wrote:<BR>
><BR>
> Hi.<BR>
><BR>
> <BR>
><BR>
> Two questions:<BR>
><BR>
> <BR>
><BR>
> 1. Is it possible to use a variable in a IN(...) ?<BR>
><BR>
> <BR>
><BR>
> E.g.<BR>
><BR>
> <BR>
><BR>
> when<BR>
><BR>
> $someVar : SomeObj()<BR>
><BR>
> ("pqr" in ("abc", $someVar))<BR>
><BR>
> then<BR>
><BR>
> ...<BR>
><BR>
> <BR>
><BR>
> 2. Can I use strings in an eval() to dynamically generate rules?<BR>
><BR>
> <BR>
><BR>
> E.g.<BR>
><BR>
> <BR>
><BR>
> when<BR>
><BR>
> eval("$aaa == 0")<BR>
><BR>
> then<BR>
><BR>
> ...<BR>
><BR>
> <BR>
><BR>
> Thanks in advance!<BR>
><BR>
> <BR>
><BR>
> --Arsalan<BR>
><BR>
> This message contains information that may be privileged or<BR>
> confidential and is the property of the Capgemini Group. It is<BR>
> intended only for the person to whom it is addressed. If you are not<BR>
> the intended recipient, you are not authorized to read, print, retain,<BR>
> copy, disseminate, distribute, or use this message or any part<BR>
> thereof. If you receive this message in error, please notify the<BR>
> sender immediately and delete all copies of this message.<BR>
><BR>
> <BR>
><BR>
><BR>
> ------------------------------------------------------------------------<BR>
><BR>
><BR>
> <BR>
> _______________________________________________<BR>
> rules-users mailing list<BR>
> rules-users@lists.jboss.org <<A HREF="mailto:rules-users@lists.jboss.org">mailto:rules-users@lists.jboss.org</A>><BR>
> <A HREF="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A><BR>
> <BR>
><BR>
> <BR>
><BR>
> This message contains information that may be privileged or<BR>
> confidential and is the property of the Capgemini Group. It is<BR>
> intended only for the person to whom it is addressed. If you are not<BR>
> the intended recipient, you are not authorized to read, print, retain,<BR>
> copy, disseminate, distribute, or use this message or any part<BR>
> thereof. If you receive this message in error, please notify the<BR>
> sender immediately and delete all copies of this message.<BR>
><BR>
> ------------------------------------------------------------------------<BR>
><BR>
> _______________________________________________<BR>
> rules-users mailing list<BR>
> rules-users@lists.jboss.org<BR>
> <A HREF="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A><BR>
> <BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>