SSIS 2008 User Variable in Expression for Execute Process Task
Asked Answered
S

1

1

I have an SSIS 2008 package.

I have 3 user variables in the package. One is for an the environment, one is for the path for an executable, and the other is part of a message for an email.

I have a Script Task that sets the variable for the path (strAppPath) based on the environment variable.

strAppPath is used in an expression for the Executable property of an Execute Process Task. The job fails stating that the executable path for the Execute Process Task is not set.

I'm assuming that it is checking this path before the Script Task sets the variable.

Is there a way to work around this?

Swanhilda answered 7/8, 2013 at 14:35 Comment(2)
Can't you just set a default value for it and let the task adjust it at run time?Mona
If you want it completely dynamic no. The DelayValidation needs to be set to True because if you default it to a location that doesn't exist, it will still fail the validation.Swanhilda
W
4

Right click on your Execute Process Task and select Properties. In the properties window, you will have a DelayValidation option that is currently set to False Flip that to True.

What is happening is that when the package starts, it goes through a validation phase to ensure everything is kosher before it begins (no need to start processing if something is broken). In your case, that full validation is not desired as the Execute Process Task won't be valid until right before it's time to run. The validation will occur, just that it is delayed until it is time for the task to begin. Make sense?

Wickner answered 7/8, 2013 at 14:44 Comment(1)
I tried that previously and it didn't work. Come to find out the package never got updated on the server. I deployed it again and now it works.Swanhilda

© 2022 - 2024 — McMap. All rights reserved.