file exists. An expression on the precedence constraint coming
out of the Script Task determines whether the answer returned
from the script is set to true or false. If the file exists, then Task
A is run; otherwise, Task B is run. After that, note that regardless
of whether Task A or B is run, the Archive Script Task always
runs because of the Logical Or constraint. Finally, if the Sequence
Container succeeds, then Task C is run, and if it does not, then the
Alert Script Task is run.
You may have noticed that in Figure 2-17, I added the names
of the precedence constraints (success, failure, completion) to each
of the arrows. This may be necessary for those who are colorblind
(and is required for this book because it’s printed in black
and white). To do this in SSDT, select Tools ➪ Options, and then
check “Show precedence constraint labels” under the Business
Intelligence Designers ➪ Integration Services Designers tab, as
shown in Figure 2-18.
Figure 2-18
Figure 2-19
Task Grouping
A very nice usability feature in SSIS is the capability to group tasks
or transforms logically in containers. For example, if you have a
group of tasks that create and purge the staging environment, you
can group them together so that your package is not cluttered
visually. For example, in Figure 2-19 there are two tasks to load data
and send a message. To group them, select both tasks by clicking one
task and holding the Ctrl key down while you select the second task.
Then, right-click the tasks and select Group.
Figure 2-17