SSIS - Disable Task Based on Variable Value
0
votes
1
answer
5214
views
I have an SSIS package that runs a number of **Data Flow Tasks** all at the same time.
Each **Data Flow Task** is placed inside a Sequence Container.
Before the **Data Flow Tasks** are run, a **Script Task** is used to check what **Data Flow Tasks** are required to run.
Each **Data Flow Task** also has a related variable, which is set to true or false by the **Script Task**. The Data Flow Tasks use the variable value as a *Disable Expression* property.
When run initially, the process works as expected. Those Tasks that have variable value = true do run, and those that have a variable value = false do not run.
However, the next time I go to run the package all **Data Flow Tasks** are disabled initially (probably because the related variables are set to false).
But even when some variables are then set to true at runtime, the Tasks remain disabled. The *Disable Expression* does not seem to pick up the latest variable value. (in the Watch window I can see the variable values have updated correctly)
I tried setting '*DelayValidation*' *= true* on each Task but no change.
Any reason why this happens?

Asked by Kevin
(533 rep)
Feb 22, 2018, 01:56 PM
Last activity: Feb 22, 2018, 02:41 PM
Last activity: Feb 22, 2018, 02:41 PM