can we skip a dataflow task based on expression/Constraint Editor?

  • Hi,

    I have a sequence of data flow tasks in my package. And i wanted to skip one of the data flow task in the middle if the expression fails. For example i've 3 data flow tasks and all are sequential. i have the expression between the Data flow tasks 1 and 2. When the expression returns false the package execution get's completed without executing Data flow task 3. But i want that Data flow task 3 also to be executed. If the expression returns true then the data flow task 3 needs to be waited till the data flow task 2 completes.

    Is there any way to implement this in a single package itself?

    Thanks,

    J

  • Ok, here is a few screen prints of the behavior I think you want.

    The control flow has three data flow components. I have a variable "MyVar".

    Task 1 will always run.

    When @MyVar==1, Task 2 will run and then Task 3 will run.

    When @MyVar==0, Task 3 will run (Task 2 will be skipped).

    The control flow and expression dialogs are attached.

  • Hi,

    Thanks for your reply. As per your flow Task 3 is still waiting for the Task 2 to complete. Here task 2 is not going to execute since the expression fails and since task 3 is getting the flow from task 1 and 2 the package execution will be completed after executing the task 1.

    Any way i have found the solution by changing the input flow of task 3 constraint to logical OR. The expression for both the task 1 and task 2 needs to be just opposite, or else task 2 and 3 will be executed in parallel.

    Screen shot has been attached with this.

    I got this idea from your reply only.. 🙂 Thank you so much.

    Regards,

    J

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply