[rules-users] Drools fusion logic

Wolfgang Laun wolfgang.laun at gmail.com
Mon Nov 4 01:13:54 EST 2013


Once for each MyEvent after its insertion and once after each
update/modify of an existing fact.

A window:time doesn't change the fundamentals,  it acts just like any
other constraint based on the object's attributes.

-W

On 03/11/2013, Elran Dvir <elrand at checkpoint.com> wrote:
> Hi all,
>
> I am using Drools Fusion in stream mode.
> Let's assume I have a very simple rule:
>
>
> rule "Simple"
>
> enabled true
>
> dialect "java"
>
> no-loop
>
> when
>
>     $myEvent : MyEvent()
>
> then
>
>    System.out.println($myEvent.toString());
>
> end
>
>
>
> 1.       When will the rule be fired? If there is a "MyEvent" in working
> memory? Or only if a new "MyEvent" was inserted since last activation?
>
> 2.       Will the rule be activated for each compatible (as answered in q1)
> "MyEvent"? or for just one arbitrary "MyEvent"?
>
> 3.       What if my LHS was  "$myEvent : MyEvent() over window:time(60s)"?
> Were the answers for q2 and q3 different?
>
> Thanks.
>


More information about the rules-users mailing list