Project: mule
Issue MULE-6441: Inconsistent behaviour of foreach with inside flowvar
The index of the foreach inside the flow of the flowref is not consistent. It seems that there is a lack of atomicity with the invocation variables causing as a result jump of indexes of the iteration and overwrite of invocation variables. In the example below my payload is the result of a sql query so an ArrayList. I save the value of each row in a flow variable to make it always available in next operations (the original project has more flowRef). The problem comes out because in the contained flow accessed by the flowRef, the invocation variable carrying the index of the iteration and also the name of the element that I saved is not consistent during each iteration. Sometimes some idexes are jumped and also the element of my array tooks more time the same value.
Story points: 5