there are no examples, but its straight forward, its no different to how
you do stuff in java land.
in the consquence do:
RuleBase ruleBase = drools.getWorkingMemory().getRuleBase();
The rest is done with PacakgeBuilder as per normal, I'm sure you can
figure out the rest.
Mark
Arsalan S. Zaidi wrote:
Hi Mark.
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.
Thanks for you help so far! :-)
--Arsalan
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org on behalf of Mark Proctor
Sent: Mon 13-Aug-07 7:23 PM
To: Rules Users List
Subject: Re: [rules-users] variables in rules
yes, you can do it in a consequence or from java land.
Mark
Arsalan S. Zaidi wrote:
>
> Hi Mark.
>
>
>
> Thanks for the quick reply! :-)
>
>
>
> About question no. 2, is there anyway to do something like that with
> Drools?
>
>
>
> Regards,
>
>
>
> --Arsalan
>
>
>
> ------------------------------------------------------------------------
>
> *From:* rules-users-bounces(a)lists.jboss.org
> [mailto:rules-users-bounces@lists.jboss.org] *On Behalf Of *Mark Proctor
> *Sent:* 13 August 2007 18:03
> *To:* Rules Users List
> *Subject:* Re: [rules-users] variables in rules
>
>
>
> yes you can use a variable, and no you cannot dynamically generate
> rules in an eval.
>
> Mark
> Arsalan S. Zaidi wrote:
>
> Hi.
>
>
>
> Two questions:
>
>
>
> 1. Is it possible to use a variable in a IN(...) ?
>
>
>
> E.g.
>
>
>
> when
>
> $someVar : SomeObj()
>
> ("pqr" in ("abc", $someVar))
>
> then
>
> ...
>
>
>
> 2. Can I use strings in an eval() to dynamically generate rules?
>
>
>
> E.g.
>
>
>
> when
>
> eval("$aaa == 0")
>
> then
>
> ...
>
>
>
> Thanks in advance!
>
>
>
> --Arsalan
>
> 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.
>
>
>
>
> ------------------------------------------------------------------------
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org <mailto:rules-users@lists.jboss.org>
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
> 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.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
------------------------------------------------------------------------
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.
------------------------------------------------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users