Bandwidth Monitor
SQLDTS.comSQLIS.comSQLIS Wiki
Introduction to Expressions on Workflow
By Allan Mitchell
Version 2005
Level Intermediate
Page 1 | Page 2 | Page 3

Once we have the Script task on the designer we then add 5 sequence containers. These are as the name suggests a wonderful place in which to put a sequence of tasks you want to execute. For us they would hold any tasks that were to be executed on the relevant day of the week. We have labelled them according to the day of the week as well.

We now join them to the Script task by means of the Green constraints that appear from the bottom of the Script task. Presently if we were to execute this package as is then regardless of what day of the week it was we would execute all our containers which is not what we want so we need a way of controlling that and here is where our expression comes in.

Double click on the green line between the Script task and the Sequence Monday sequence container. You will see similar to the following graphic.

WrkFlowComplete

There are two things of interest to us here and that is Evaluation Operation and Expression. Have a look around and see the combinations you can have. For our example though all we need is to have the constraint be processed because of an expression and that expression is the evaluation of whether our variable equals our chosen day of the week. You would repeat this process for each Workflow constraint which in our case is 5.

Page 1 | Page 2 | Page 3