Bug 1039586 - Temporal constraints with timers do not use 'this' as expected
Summary: Temporal constraints with timers do not use 'this' as expected
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER 7
: 6.0.0
Assignee: Mario Fusco
QA Contact: Tomas Schlosser
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-09 14:46 UTC by Richard Bourner
Modified: 2014-08-06 20:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:18:42 UTC
Type: Bug


Attachments (Terms of Use)
Eclipse Maven project demonstrating the problem (26.30 KB, application/zip)
2013-12-09 14:46 UTC, Richard Bourner
no flags Details

Description Richard Bourner 2013-12-09 14:46:00 UTC
Description of problem:
With ReteOO and a rule with a temporal condition creating a timer (eg after), the timer is created only if the first member of the condition is 'this'.
If 'this' is mapped to a local variable or the condition is reversed (using "ev before this" for example), the timer is not created and the condition doesn't seem to evaluate.

The code causing this is in org.drools.core.rule.Declaration:
    public boolean isPatternDeclaration() {
        return ( this.pattern != null && this.pattern.getDeclaration() == this ) || this.getIdentifier().equals( "this" ) ;
    } 

This may not be a problem because we are in a negative CE, but it looks like one because it works with the other rule.

Version-Release number of selected component (if applicable):
6.0.0.CR5

How reproducible:
Use the JUnit test in the Maven project attached.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Richard Bourner 2013-12-09 14:46:42 UTC
Created attachment 834348 [details]
Eclipse Maven project demonstrating the problem

Comment 3 Edson Tirelli 2013-12-09 16:16:04 UTC
Setting the priority to medium as this is the same as 5.3, and ReteOO is the legacy algorithm.

Comment 5 Tomas Schlosser 2014-01-09 07:32:54 UTC
Verified with BRMS 6.0.1-redhat-2


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