[rules-users] using after in calendar rule

Alexander Wolf mail at alexander-wolf.net
Fri Sep 13 10:40:03 EDT 2013


Following rule does not work for me (see exception) - I got the impression that having a calendar for a rule that uses "after" leads to this. Any ideas? (Version 5.5.0 Final)
The point of time I get the exception is NOT within the defined calendar time (the rule should actually be ignored at that time...)

rule "myrule"
	calendars "myCalendar"  
when
	//an event		
	$event: Event() from entry-point "EventStream"
	//no more events after
 	not (Event(this after[0 , 30m] $event)from entry-point "EventStream" )	
then
	//actions
end

Exception in thread "main" org.drools.RuntimeDroolsException: Unexpected exception executing action org.drools.reteoo.PropagationQueuingNode$PropagateAction at 56a75737
	at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:995)
	at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:362)
	at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
	at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:127)
	at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:55)
	at Application.runSimulation(Test.java:173)
	at Application.main(Test.java:68)
Caused by: java.lang.NullPointerException
	at org.drools.time.impl.PseudoClockScheduler.removeJob(PseudoClockScheduler.java:147)
	at org.drools.common.Scheduler.removeAgendaItem(Scheduler.java:75)
	at org.drools.common.DefaultAgenda.removeScheduleItem(DefaultAgenda.java:475)
	at org.drools.common.DefaultAgenda.removeActivation(DefaultAgenda.java:352)
	at org.drools.common.DefaultAgenda.cancelActivation(DefaultAgenda.java:688)
	at org.drools.reteoo.RuleTerminalNode.retractLeftTuple(RuleTerminalNode.java:322)
	at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateRetractLeftTuple(SingleLeftTupleSinkAdapter.java:224)
	at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateRetractLeftTuple(SingleLeftTupleSinkAdapter.java:98)
	at org.drools.reteoo.NotNode.retractLeftTuple(NotNode.java:216)
	at org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:250)
	at org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:131)
	at org.drools.reteoo.NotNode.propagateRetractLeftTuple(NotNode.java:444)
	at org.drools.reteoo.NotNode.assertObject(NotNode.java:140)
	at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
	at org.drools.reteoo.PropagationQueuingNode$AssertAction.execute(PropagationQueuingNode.java:426)
	at org.drools.reteoo.PropagationQueuingNode.propagateActions(PropagationQueuingNode.java:280)
	at org.drools.reteoo.PropagationQueuingNode$PropagateAction.execute(PropagationQueuingNode.java:588)
	at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:993)
	... 6 more

- Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130913/5a7272a5/attachment.html 


More information about the rules-users mailing list