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