Bug 995198

Summary: Timed rules can disrupt other activations as they are being fired
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Mario Fusco <mfusco>
Component: BRE (Expert, Fusion)Assignee: Mario Fusco <mfusco>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.1CC: nwallace
Target Milestone: GA   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:28:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 986451    

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> 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> updated the status of jira DROOLS-182 to Resolved

Comment 6 Red Hat Bugzilla 2025-02-10 03:28:18 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.