<!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>
&gt;<BR>
&gt; Hi Mark.<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; Thanks for the quick reply! :-)<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; About question no. 2, is there anyway to do something like that with<BR>
&gt; Drools?<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; Regards,<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; --Arsalan<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; ------------------------------------------------------------------------<BR>
&gt;<BR>
&gt; *From:* rules-users-bounces@lists.jboss.org<BR>
&gt; [<A HREF="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</A>] *On Behalf Of *Mark Proctor<BR>
&gt; *Sent:* 13 August 2007 18:03<BR>
&gt; *To:* Rules Users List<BR>
&gt; *Subject:* Re: [rules-users] variables in rules<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; yes you can use a variable, and no you cannot dynamically generate<BR>
&gt; rules in an eval.<BR>
&gt;<BR>
&gt; Mark<BR>
&gt; Arsalan S. Zaidi wrote:<BR>
&gt;<BR>
&gt; Hi.<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; Two questions:<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp; 1. Is it possible to use a variable in a IN(...) ?<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; E.g.<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; when<BR>
&gt;<BR>
&gt; $someVar : SomeObj()<BR>
&gt;<BR>
&gt; (&quot;pqr&quot; in (&quot;abc&quot;, $someVar))<BR>
&gt;<BR>
&gt; then<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp; 2. Can I use strings in an eval() to dynamically generate rules?<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; E.g.<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; when<BR>
&gt;<BR>
&gt; eval(&quot;$aaa == 0&quot;)<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; Thanks in advance!<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; --Arsalan<BR>
&gt;<BR>
&gt; This message contains information that may be privileged or<BR>
&gt; confidential and is the property of the Capgemini Group. It is<BR>
&gt; intended only for the person to whom it is addressed. If you are not<BR>
&gt; the intended recipient, you are not authorized to read, print, retain,<BR>
&gt; copy, disseminate, distribute, or use this message or any part<BR>
&gt; thereof. If you receive this message in error, please notify the<BR>
&gt; sender immediately and delete all copies of this message.<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt;<BR>
&gt; ------------------------------------------------------------------------<BR>
&gt;<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt; _______________________________________________<BR>
&gt; rules-users mailing list<BR>
&gt; rules-users@lists.jboss.org &lt;<A HREF="mailto:rules-users@lists.jboss.org">mailto:rules-users@lists.jboss.org</A>&gt;<BR>
&gt; <A HREF="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A><BR>
&gt;&nbsp;&nbsp;<BR>
&gt;<BR>
&gt;&nbsp;<BR>
&gt;<BR>
&gt; This message contains information that may be privileged or<BR>
&gt; confidential and is the property of the Capgemini Group. It is<BR>
&gt; intended only for the person to whom it is addressed. If you are not<BR>
&gt; the intended recipient, you are not authorized to read, print, retain,<BR>
&gt; copy, disseminate, distribute, or use this message or any part<BR>
&gt; thereof. If you receive this message in error, please notify the<BR>
&gt; sender immediately and delete all copies of this message.<BR>
&gt;<BR>
&gt; ------------------------------------------------------------------------<BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; rules-users mailing list<BR>
&gt; rules-users@lists.jboss.org<BR>
&gt; <A HREF="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A><BR>
&gt;&nbsp;&nbsp;<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>