In the sectioned marked "Documentation" there is the Drools manual. Its s work in progress. But I took time to make rail road diagrams, similar to BNF, for all valid syntax.

Mark
Dmitry Goldenberg wrote:
Can someone provide a summary of the new syntax?  A BNF would be great.  I 
guess if it's just WHEN/THEN there's no need.  I don't see any mention of this 
on this on the http://drools.codehaus.org/ pages...

________________________________

From: Peter Van Weert [mailto:[EMAIL PROTECTED]
Sent: Thu 4/13/2006 11:01 AM
To: [email protected]
Subject: Re: [drools-user] Using While in drools



It is the Drools 3 lingo:

        http://labs.jboss.com/jbossrules

It is just the new and improved way of writing if-then rules, but still
without the else!

Dmitry Goldenberg wrote:
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: [email protected]
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