hey,
I have a problem with events and facts: when i have two existing facts
(resources) und i am inserting an event (request), then following rule is
fired twice (for each resource)

/declare ReservationRequest
        @role ( event )
        @timestamp ( timestamp )
        @expires(0s)
end

rule "Allocate"
no-loop true
when
    $resource : Resource(state == 0)
    $request : ReservationRequest() from entry-point "EventStream"
then
        modify($resource) { setState(1) };
        insert(new Allocation($resource, $request.getDuration()));
       
        log.warn("Rule 'Allocate' fired: '" + $resource.getName() + "' on
Request '" + $request.getName());
end/

Any ideas why?



--
View this message in context: 
http://drools.46999.n3.nabble.com/Event-and-Facts-Problem-tp4024622.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to