]
Mark Proctor updated JBRULES-1770:
----------------------------------
Fix Version/s: 5.2.0.M1
(was: 4.0.8)
These issues where all marked for 4.0.8, we no longer maintain the 4.0.x branch in the
community. I'm moving them to 5.2.0.M2, so they can be checked that they no longer
cause a problem there, and fixed if they do. If you require these fixed at the 4.0.x
branch level, then please contact sales(a)jboss.com for subscription based support.
IndexOutOfBoundsException with subflows while removing listener from
RuleFlowEventSupport
-----------------------------------------------------------------------------------------
Key: JBRULES-1770
URL:
https://jira.jboss.org/browse/JBRULES-1770
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core (flow)
Affects Versions: 4.0.7
Environment: MyEclipse Blue, Windows XP,
Reporter: Richard bedard
Assignee: Kris Verlaenen
Fix For: 5.2.0.M1
I have 9 ruleFlows, A, B and C and 6 others
A is the main one that include B as a subflow and 6 others, B include C as a subflow
When RuleFlowEventSupport.fireRuleFlowProcessCompleted is called, the listeners list
contains 8 elements, 1 per sub ruleflow.
The size of the list is set in a variable "size" for performance i guess:
for ( int i = 0, size = this.listeners.size(); i < size; i++ ) {
But somehow, i didn't check the reason, the method removeEventListener is called and
the list size is now 7, so im
having an java.lang.IndexOutOfBoundsException.
This appen when the subflow C isn't changing the working memory(no insert, modify or
remove), when an object is inserted,
there is no error... I've tried with and without shadow fact "setShadowProxy(
false/true );"
Object removed:
listener RuleFlowProcessInstanceImpl (id=7454)
id 2
nodeInstances ArrayList<E> (id=7749)
process RuleFlowProcessImpl (id=7750)
state 2
workingMemory ReteooStatefulSession (id=7444)
Stack that show the object removing while iterating on the list:
RuleFlowEventSupport.removeEventListener(RuleFlowEventListener) line: 48 <----- A
listener is removed here
ReteooStatefulSession(AbstractWorkingMemory).removeEventListener(RuleFlowEventListener)
line: 306
RuleFlowProcessInstanceImpl.setState(int) line: 184
EndNodeInstanceImpl.trigger(RuleFlowNodeInstance) line: 30
RuleFlowJoinInstanceImpl.triggerCompleted() line: 89
RuleFlowJoinInstanceImpl.checkActivation() line: 85
RuleFlowJoinInstanceImpl.trigger(RuleFlowNodeInstance) line: 59
SubFlowNodeInstanceImpl.triggerCompleted() line: 51
RuleFlowProcessInstanceImpl.ruleFlowCompleted(RuleFlowCompletedEvent, WorkingMemory)
line: 262
RuleFlowEventSupport.fireRuleFlowProcessCompleted(RuleFlowProcessInstance,
InternalWorkingMemory) line: 86 <--- Iterating on the listeners list here
RuleFlowProcessInstanceImpl.setState(int) line: 185
EndNodeInstanceImpl.trigger(RuleFlowNodeInstance) line: 30
RuleFlowJoinInstanceImpl.triggerCompleted() line: 89
RuleFlowJoinInstanceImpl.checkActivation() line: 85
RuleFlowJoinInstanceImpl.trigger(RuleFlowNodeInstance) line: 59
RuleFlowGroupImpl(RuleFlowSequenceNodeInstanceImpl).triggerCompleted() line: 38
RuleFlowGroupImpl.setActive(boolean) line: 103
RuleFlowGroupImpl$DeactivateCallback.execute(InternalWorkingMemory) line: 211
ReteooStatefulSession(AbstractWorkingMemory).executeQueuedActions() line: 1312
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules(AgendaFilter, int) line: 467
ReteooStatefulSession(AbstractWorkingMemory).fireAllRules() line: 439
DroolsStdImpl.executeRulesEngine(List<Object>, String) line: 100
UPDATE:
When i remove the subflow C from the ruleflow B, and move the 2 ruleFlowGroup from C to
B, there is no error.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: