<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
there are no examples, but its straight forward, its no different to
how you do stuff in java land.<br>
<br>
in the consquence do:<br>
RuleBase ruleBase = drools.getWorkingMemory().getRuleBase();<br>
<br>
The rest is done with PacakgeBuilder as per normal, I'm sure you can
figure out the rest.<br>
<br>
Mark<br>
Arsalan S. Zaidi wrote:
<blockquote
cite="mid:9E2A64E42D1FE1409AE18487B7446C1912D07A@PUNEXC16.kanbay.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator"
content="MS Exchange Server version 6.5.7651.59">
<title>RE: [rules-users] variables in rules</title>
<!-- 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: <a class="moz-txt-link-abbreviated" href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> 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:* <a class="moz-txt-link-abbreviated" href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a><br>
> [<a moz-do-not-send="true"
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>
> <a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a> <<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org">mailto:rules-users@lists.jboss.org</a>><br>
> <a moz-do-not-send="true"
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>
> <a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
> <a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
> <br>
<br>
<br>
</font>
</p>
<pre wrap="">
<hr size="4" width="90%">
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
</pre>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>