[rules-users] Event and Facts Problem

Andynator hickl.andy at gmail.com
Fri Jun 28 08:28:46 EDT 2013


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.


More information about the rules-users mailing list