For example if the variable is True, I want to run the Task else just skip this task and continue to the next one. The Control flow should continue after this task. How do I achieve this?
How to do the same for "Execute SQL" task?Lets assume this simple scenario:
Task 1 > Execute package (task 2) > Task 3
Lets change this for the desired behavior.
After Task1, have one arrow go to Execute package task, as above AND have another arrow go from Task 1 to Task 3 directly.
Now, right-click on BOTH the arrows and specify expression on each of them. One expression will be @.my_variable = true and another will be @.my_variable = false.
Depending upon value of @.my_variable, one of the paths will be taken.
HTH,
Nitesh|||This doe't help I tried it already. It breaks the flow. The control never reaches to Task3. I want to just skip Task2. In Both case I want to run Task3. When the condition is not met for Task2, the control flow breaks there. According to MS, that is by design. I have no idea to about how to achieve this. Any help will be appreciated.|||Ok, Let's try this. Have the control flow as follows:
Task 1 -> Task 2 -> Task 3
And another path directly from Task 1 -> Task 3
For Task 2, set the expression for "Disable" property based on the variable value you want to use to decide whether Task 2 should be executed or not.
If that variable is true, Task 2 will be disabled, if not it will remain enabled. Let me know if that lets you accomplish your scenario.
Thanks
Ranjeeta|||
See this thread:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=63760
K
mci wrote:
This doe't help I tried it already. It breaks the flow. The control never reaches to Task3. I want to just skip Task2. In Both case I want to run Task3. When the condition is not met for Task2, the control flow breaks there. According to MS, that is by design. I have no idea to about how to achieve this. Any help will be appreciated.
Place task1 and task2 in a sequence container. Task3 should execute after the sequence container. You can put an expression on the precedence constraint between task1 and task2 to specify whether task2 should execute or not.
More details here: http://blogs.conchango.com/jamiethomson/archive/2005/07/27/1889.aspx. The bit in the "UPDATE" section at the bottom illustrates exactly what I have described here.
-Jamie
No comments:
Post a Comment