Bug 995198 - Timed rules can disrupt other activations as they are being fired
Summary: Timed rules can disrupt other activations as they are being fired
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion)
Version: BRMS 5.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: ---
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks: 986451
TreeView+ depends on / blocked
 
Reported: 2013-08-08 18:18 UTC by Mario Fusco
Modified: 2020-04-27 01:16 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker DROOLS-182 0 Blocker Resolved Timed rules can disrupt other activations as they are being fired 2014-05-02 09:32:08 UTC

Description Mario Fusco 2013-08-08 18:18:55 UTC
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

Comment 2 Marek Winkler 2013-09-12 14:32:27 UTC
Verified on 5.3.1.BRMS-P04.

Comment 3 JBoss JIRA Server 2013-11-13 09:12:21 UTC
Mario Fusco <mario.fusco@gmail.com> updated the status of jira DROOLS-182 to Coding In Progress

Comment 4 JBoss JIRA Server 2013-11-13 09:12:32 UTC
Mario Fusco <mario.fusco@gmail.com> updated the status of jira DROOLS-182 to Resolved


Note You need to log in before you can comment on or make changes to this bug.