Hi there,
we use drools fusion 5.3. Final.
In a drl-file, a fact and an event and the following rules are declared

package ... etc

declare ActivityState
        @role(fact)
        state : StateType
end


rule "set initial state"
        dialect "java"
        salience 100
        when not (exists KFActivityState())
        then
                ActivityState $actState = new ActivityState();
                $actState.setState(StateType.STANDBY);
                insert($actState);      
                System.out.println("ActivityState inserted "+ new Date());
end




declare Command
        @role (event)
end


rule "request information"
        dialect "java"
        when Command(commandType == CommandType.REQUEST_INFORMATION) from
entry-point "XXX"
                 $s: ActivityState(state == ComponentStateType.ACTIVE||state ==
ComponentStateType.PASSIVE||state == ComponentStateType.STANDBY)
        then
                 System.out.println("Send Report");
end


The rule request information doesn't fire with the first command event, but
from the second one it fires always.

What's wrong with my code?

Thanks in advance

Ulrich

--
View this message in context: 
http://drools.46999.n3.nabble.com/rule-does-not-fire-at-first-event-tp3494056p3494056.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to