What is this lingo that you guys are using, the when/then etc.?  Is this 
supported by Drools?  Everyone just pushed back on me saying they're not going 
to support the ELSE construct and here you are talking about a WHEN?  I'm 
confused.  Please explain to a novice :)
 
Thank you.

________________________________

From: news on behalf of Russ Egan
Sent: Thu 4/13/2006 10:42 AM
To: user@drools.codehaus.org
Subject: Re: [drools-user] Using While in drools



I'm a neophyte at this as well, but I think I'd assert all the elements of
the list into WM.

Then the rule would just be:

rule
  when
    Element()
  then
    doSomething();
end

Or, if you need to only trigger something when the item is added to the list,
assert the list as a fact:

rule
  when
    $e : Element()
    ActionableElements(elements contains $e)
  then
    doSomething();
end


Hello eliane,

> Hello,
> i'm trying to do the following with drools
> Suppose we have an arrayList in our drl File and we want to compare
> each
> element in the list to a certain value if they 're equal then do
> something
> for each (element in List)
> if (element == value)
> doSomething()
> else
> next();
> how can i utilize the while logic with drools?
>
> --
>
> Eliane
>





Reply via email to