| Summary: | Temporal constraints with timers do not use 'this' as expected | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Richard Bourner <rbourner> | ||||
| Component: | BRE | Assignee: | Mario Fusco <mfusco> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Tomas Schlosser <tschloss> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 6.0.0 | CC: | mfusco, rbourner, rrajasek, rzhang | ||||
| Target Milestone: | ER 7 | ||||||
| Target Release: | 6.0.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-08-06 20:18:42 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: | |||||
| Attachments: |
|
||||||
Created attachment 834348 [details]
Eclipse Maven project demonstrating the problem
Setting the priority to medium as this is the same as 5.3, and ReteOO is the legacy algorithm. Verified with BRMS 6.0.1-redhat-2 |
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: