March 17, 2010 at 5:38 am
I have a package with a variable scoped at package level. There is a data flow in a Foreachfile container that processes flat files. There are three error redirections in the flow. Each of the redirections uses a script to change the value of the package variable from "Pass" to "Fail". The assignment of a value to the variable in the post execute phase of the scripts seems to happen even if the scripts do not run. To prove this, I put a data viewer on the flow to the script and I can see that the script does not execute, and yet, if I assign an easily recognizable value to the variable such as "Error at Post Execute" the package variable will take on the value even though the script does not execute. I can only guess that the problem is caused by validation, but I really don't know. I'm going to try changing the scope to the Foreachfile container this morning to see if that helps. Has anyone experienced a problem like this?
March 17, 2010 at 11:57 am
I solved my problem this afternoon. My data flow had three paths in it, each of which had a script that updated a package variable in it's PostExecute. The files I process only have one row, so only one branch of the script could execute for each file. However, I discovered that the PostExecutes for all three scripts execute even if the scripts don't execute. So, my package variable would always be set to the value that the last PostExecute gave it.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply