Archive for August 26th, 2013

BUG: Dynamically altering Connection String for File Connection used in Execute Package Task.

August 26th, 2013

I designed the following setup.

[script task] -> [[for each loop container] [execute package task]]

The script task parses a variable and creates an array containing a list of packages to be executed.
The For Each Loop Container parses the array and assigns each item to a variable named @PackagePath.
The File Connection for the Execute Package Task refers to @PackagePath in the expression for its Connection String.

Expected behaviour
Expected behaviour would be for the EPT to open each package according to the value in @PackagePath.

Actual behaviour
Every first succesful iteration of the EPT will open whatever package the File Connection is initially configured with. The second iteration will open the package that was configured in the previous loop. The third iteration will open the package from the second loop et cetera.

The contents of the @PackagePath variable are correct. The connection however isn't updated until the FELC has finished processing the current loop.

Changing the FELC to list the packages in a certain folder and then open each package in that folder works perfectly, but fetching the items from an array will produce the behaviour as described above.

There is no actual solution for this, although I have a crude but effective workaround.

The workaround is to have a script file to set the connection string for the File Connection. It's crude, but it works.

Posted in Selfish | Comments (0)

SEO Powered by Platinum SEO from Techblissonline