O'Reilly logo

Professional SQL Server™ 2005 Integration Services by Mike Murphy, Haidong Ji, Jason Gerard, Erik Veerman, Andy Leonard, Kathi Kellenberger, Douglas Hinson, Darren Green, Allan Mitchell, Brian Knight

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required