While dynamically changing a connection using variables and expressions inside a Foreach Loop, my source component doesn’t return any data.

While dynamically changing a connection using variables and expressions inside a Foreach Loop, my source component doesn’t return any data.

Action:

While dynamically changing a connection using variables and expressions inside a Foreach Loop, my source component doesn’t return any data. 

Solution:

Be sure to set RetainSameConnection=False in your connection.

Ideas:

For scalability and performance, you might want to consider using COZYROC’s more advanced Parallel Loop Task, which can execute multiple iterations of the standard Foreach Loop Container concurrently. Based on actual tests, when a CPU-intensive process is run on a 4-core machine using this Parallel Loop Task, it executes 3 times faster as compared to running the same process sequentially.