13.1. Precedence Constraints

Precedence constraints, those green, red, and blue arrows, can be used to handle error conditions and the workflow of a package. Figure 13-1 shows a typical example. If the Initial Data Flow task completes successfully, the Success Data Flow task will execute. A green arrow (on the left) points to the Success Data Flow task. If the Initial Data Flow task fails, the Failure Send Mail task executes, sending notification of the failure. A red arrow (in the middle) points to the Failure Send Mail task. No matter what happens, the Completion Script task will always execute. A blue arrow (at the right) points to the Completion Script task.

Figure 13.1. Figure 13-1

By default, the precedence constraint will be a green arrow designating success. To change how the precedence constraint is evaluated, you can right-click the arrow and choose a different outcome from the pop-up menu, as shown in Figure 13-2.

Figure 13.2. Figure 13-2

In addition to the success, failure, or completion of a task, you can combine the task outcome with a Boolean expression to determine the flow. Using Boolean expressions with precedence constraints will be discussed shortly. Tasks may also be combined into groups by using containers, and the workflow can be controlled by the success ...

Get Professional SQL Server™ 2005 Integration Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.