Hi All,
I have two questions related with drools 5.0
Q1- How can I triggered each rule one by one like
rule 01
when
..
then
..
End
rule 02
when
..
then
..
End
rule 03
when
Have been helped about declaring attributes of facts for things such
as propertyChangeSupport. However, when I import a DRL file that has
such attributes into Guvnor, there does not appear to be any evidence
that anything happens. The source code returned from Guvnor does not
include the
How about
when
Time(value==10) //it's 10 o'clock
$aFriend: Friend() //any friend in the working memory
then
//RHS will be fired for each friend if it's 10 o'clock
end
or:
when
Time(value==10) //is it 10?
$self:Self() //get a handle to yourself
$friend
In the case below you don't need to iterate manually. You can use the
"contains" LHS element. Take a look at the manual and you will see it. Or you
can insert your List directly and use the "from" LHS element
Using from it might look like:
rule "test"
when
String(this=="10") //<--The t
Phil,
Take a look at the manual and look for the "forall" LHS conditional element if
you can pass all of your objects individually. Or if you must pass your items
into WM as a List then take a look at the "collect" LHS element examples.
In your example if you wanted to say "All Golfers have red
Thanks for the reply Ingomar.
> I am still not quite there.
> >, I would like a foreach which itterates through a list in my java
> class, e.g. "Golfer", and addes the conditions in the collection to my
> rule with "ANDs"
> So the condition is where?
>
> What I would be looking for is a plai
Phl,
I am still not quite there.
>, I would like a foreach which itterates through a list in my java
class, e.g. "Golfer", and addes the conditions in the collection to my
rule with "ANDs"
So the condition is where?
What I would be looking for is a plain text description of the rule, ie.
"fi
Hello,
> maybe you can tell us what you are trying to do? Are you talking about
> the RHS?
>
> --Ingomar
thank you for your reply. I would like to use a template drl file together with
a java class. Both the LHS and RHS should contain variables, where the LHS
should itterate over a collecti
Phil,
maybe you can tell us what you are trying to do? Are you talking about
the RHS?
--Ingomar
Am 16.02.2009 um 23:15 schrieb can_...@gmx.de:
Hello,
I would like to itterate over a list in a drl template file, I
looked at http://mvel.codehaus.org/MVEL+2.0+Orb+Tags
@foreach{item : prod
Hello,
I would like to itterate over a list in a drl template file, I looked at
http://mvel.codehaus.org/MVEL+2.0+Orb+Tags
@foreach{item : products}
- @{item.serialNumber}
@end{}
but I just can't get the syntax right. Could someone please post an example drl
file with a foreach.
Thank you
Ah, well that's my point of ignorance, then. I was thinking in stateless mode.
:) And to do what I suggest in a stateful manner would require a
"modifyLogical" type functionality in place of the insertLogical. i.e.
modifyLogical (object) {
//do this when the condition obtains
} else {
//d
Unfortunately, when a constraint rule no longer applies, the score
wouldn't decrement.
So this would work in a stateless working memory, where the entire score
is recalculated for every move of every step.
But drools-solver works in a statefull working memory, where only the
part of the score
12 matches
Mail list logo