String drl = "package org.drools.test; \n" + "import org.drools.Person; \n " + "global java.util.List list; \n" + "\n" + "\n" + "rule TimeConsumingRule\n" + "when \n" + " $p : Person( $n : name ) \n" + "then \n" + " System.out.println( Thread.currentThread().getName() + \"Ill continue later \" ); \n" + " Thread.sleep( 1000 ); \n" + " System.out.println( Thread.currentThread().getName() + \"Hello >> \" + $n );\n" + "end\n" + "\n" + "rule PreemptingRule\n" + "timer( expr:0 )\n" + "when\n" + " $p : Person()\n" + "then\n" + " System.out.println( Thread.currentThread().getName() + \"Take out \" + $p ); \n" + " retract( $p );\n" + "end\n" + "\n" ; This particular test case throws a NPE when the accessor $n tries to read the - retracted - Person's name. The exception is not thrown when the time is > 0
Fixed by https://github.com/droolsjbpm/drools/commit/f3f6a7361d85b43e03fc0a88bb028c032e2369e1
Verified on 5.3.1.BRMS-P04.
Mario Fusco <mario.fusco> updated the status of jira DROOLS-182 to Coding In Progress
Mario Fusco <mario.fusco> updated the status of jira DROOLS-182 to Resolved
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.