Bug 1331347

Summary: Incremental compilation with rules that use eval fails
Product: [Retired] JBoss BRMS Platform 6 Reporter: Tibor Zimanyi <tzimanyi>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED EOL QA Contact: Tibor Zimanyi <tzimanyi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: lpetrovi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:07:56 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:

Description Tibor Zimanyi 2016-04-28 10:54:09 UTC
Description of problem:

When using evals in rules, incremental compilation fails on various errors. See reproducer from PR [1]. There are at least 4 different failing stacktraces in the tests.

E.g. this: 

Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
	at org.drools.core.phreak.AddRemoveRule.handleExistingPaths(AddRemoveRule.java:394)
	at org.drools.core.phreak.AddRemoveRule.addRule(AddRemoveRule.java:124)
	at org.drools.core.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:190)
	at org.drools.core.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:133)


Version-Release number of selected component (if applicable): 6.3.0.CR1


How reproducible: 

Run tests from PR: https://github.com/droolsjbpm/drools/pull/760