> On 19 July 2011 13:42, Marc Heinz wrote:
>> So, despite I have only updated one attribute of the fact (the age of a
>> Person), all rules have been fired again, even if they had nothing to do
>> with the said attribute, which could possibly produce a huge overhead.
>>
>> I maybe misunderstood so
Interval-based events must have a property for their duration (in ms), not
the end time.
@duration(duration)
duration : long
-W
2011/7/22 Neelesh Deo Dani
> Hi,
> I've following event declarations and rule:
>
> declare Event
> @role(event)
> @timestamp(datetime)
> datetime : Date
>
The insertion of DataReading events happens "instantaneously", without
Drools regaining "consciousness" in between. So, when the Engine wakes up,
it finds 20 activations in its agenda, with the same salience. Tie breaking
is defined to use LIFO.
Running the Engine in real time, these 20 events are
Hi,
I've following event declarations and rule:
declare Event
@role(event)
@timestamp(datetime)
datetime : Date
name : String
end
declare Contest
@role(event)
@timestamp (startTimestamp)
startTimestamp : Date
endTimestamp : Date
end
rule "Contes
Hi guys,
I am newbie in this kind of things, but I am facing some difficults to use
Smooks 1.4 an d Drools 5.2. It seams that MVEL2 present in the drools 5.2
distribution is not compatible with Smooks 1.4.
Did anybody have similar problems ?
If a have a separate project, which uses Smooks 1.4, my
Update:
the sample project may have the modifier "final" on the main method for
some reason...I have no idea how or why that got on there, but will
prevent eclipse from running it.
Also, I believe i found the problem:
rule "Wait for follup config"
lock-on-active
when
$dr: DataReading(read
I have attached my program project with my main FusionMain.java and two
small classes and my rule file Sample.drl.
It's a zip file i have modified to be .piz for mail server reasons.
In the Main I set up and run as STREAM mode session and execute on a
background thread .fireUntilHalt().
The
Basically, you can either update an object with the results of the first
rule, or create a new object.
Like:
rule "Hungry"
when
$person : Person(hoursSinceLunch>2 || donutsOnDesk==0 ||
candybarsInDrawer==0)
then
$person.setHungry(true);
update($person);
end
rule "Food"
when
I am running a simple test like so:
package com.sample;
import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderError;
import org.drools.builder.KnowledgeBuilderErrors;
import org.drools.builder
Oops, nevermind.
I started replying to your post and when I got to the part about "Is
upcharge in all selected GroupUpcharges not null?" my immediate response
was, Yes, I'm absolutely sure of that. But then I figured I should really
make sure so I did another test ... and that's when I discovered
This is a very nice problem!
I assume that you have those MyBean facts with one String attribute code
inserted and that one String fact is being kicked in. Then the following
rule will find the longest match.
rule matchLongest
when
$string: String()
$myBean: MyBean() from accumulate(
An interesting solution, but it is not a solution for the original problem
posted in this thread.
-W
On 21 July 2011 15:58, DroolersEye wrote:
> Hi,
> rule "Total Cost"
>when
>$trip : Trip( $cost : cost)
>$totalCost : Number() from
>
Hi,
rule "Total Cost"
when
$trip : Trip( $cost : cost)
$totalCost : Number() from
accumulate(
Person( trip== $trip,
maxMoney:maxMoney ),
Hi,
I hope you can help me out here with a way to implement this rule:
1) I have String WM
2) I have beans in WM with a property called 'code'
public class MyBean {
private String code;
...
3) I want a rule of the type "Process MyBean with the longest-matching,
not-null code"
Let explain
2011/7/21 Christian Heupel
> -
>
> rule "Total Costs"
>
> when
>
> $person : Person( eval ($person.maxMoney != null ) )
>
Although not relevant to your problem: stick with the JavaBean convention:
There should be private Integer maxMoney; Integer getMaxMoney(); etc
Hi Wolfgang,
actually, I replaced some '&&' by 'and' and it does fix some errors. But with
about 2000 errors, I won't do it everywhere :)
Could you point me to the correct version?
Thanks,
Ulrich
Von: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] Im Auftrag
Thanks.
So it seems that the versions of the example and my Drools installation does
not match. Could you point me to the correct pair of Drools/example for me to
do some tests?
BTW, both my Drools and the example mentions version 5.2.0
Ulrich
Von: rules-users-boun...@lists.jboss.org
[mail
On 20 July 2011 19:35, Wolfgang Laun wrote:
> The logical "and" between *patterns* cannot be written as '&&' any more.
> Replace it with 'and'.
>
>
Disregard this please. '&&' is perfectly correct.
@Ulrich: I suspect that you have some intermediary Drools snapshot of
pre-5.2.0-final hanging arou
Hello,
I am trying to write a rule for my drools engine. It is (as far as i get it
right), almost a total standard rule, however I'm having troubles with it
and was hoping you could point me into the right direction (as i was
surprised to see no similar question, I hope it is not too basic).
19 matches
Mail list logo