This kind of precedence will depend on execution being a success, failure, or
task completion.
The line item in the Destination Connection node for OverwriteDestination is set
as False. This means if the task were to be executed a second time the task would fail
because the file exists and it cannot be overwritten.
1. Go to Windows Explorer and delete CopiedPrince.txt.
Creating a SSIS Package to Access Folders and Files
[ 196 ]
Step 4: Adding a Precedence Constraint
1. Right-click the File System Task on the Canvas and from the drop-down
choose Add Precedence Constraint, as shown in the next screenshot.
This opens the Control Flow window showing From: and To: windows
with the From: already chosen as File System Task. The drop-down for To:
reveals both the File System Task as well as the Send Mail Task.
Chapter 12
[ 197 ]
2. Choose the Send Mail Task and click on the OK button.
A green line now connects the File System Task and the Send Mail Task
3. Right click on this green line as shown in the following screenshot.
The default execution constraint is Success which means that the Send Mail will
carry out its task after the File System Task has successfully completed its task.
Step 5: Building and Executing the Package
This has been described several times in the earlier chapters.
1. Right-click the FileSystemTsk.dtsx in the Solution Explorer and execute
the package.
First the File System Task turns green while the Send Mail Task will change from
yellow to green signifying that the package succeeded.
Pages:
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146