Common Task Conventions


Although each of the stock tasks provides unique functionality, there are also some similarities between them. Microsoft made great efforts to ensure that the stock tasks adhered to certain conventions. This section covers what those conventions are, why they are important, and how to use them. All the stock tasks use these conventions to some extent, so after you understand the conventions, you can easily find your way around unfamiliar tasks as well.

Task User Interface

This section describes the standardized user interface supported by each of the stock tasks.

Task UI Sections

Figure 8.1 shows the four main sections of the stock task user interface (UI). These areas exist in all the stock task UIs. The following sections describe each of the areas.

Figure 8.1. The stock task UI is separated into four main areas


Task Description

The task description at the top of the task UI is provided to describe how the task functions and how it can be used. Don't confuse this with the Description task property. This description is the generic description of the task, whereas the Description property on all tasks is a place where package writers can document things such as how the task is configured for that particular package, and so on.

Tab Selection

The Tab Selection window allows you to view different properties windows. Every task has at least two tabs, the General tab and the Expressions tab.

Properties

The Properties window is where you make all the settings on the task. The properties shown here are a subset of the properties shown in the properties grid in the package designer when you select the task in the package. The task UI categorizes the properties into tabs so they're a little easier to find and edit. Although it's possible to edit these properties in the property grid of the designer, the task UI combines like properties together so they're easier to understand, find, and use.

Property Description

The property description describes the property that is currently selected in the Properties window. Changing the selection in the Properties window changes the description shown here. The property description helps clarify the purpose of the task property.

Unused Properties Hidden

The set of properties that are visible in the properties grid is not always the same. On almost all tasks, there are one or two key properties that when changed, the list of available properties also changes. Usually, the property is called Operation. In this chapter, these properties are called key settings. For example, the File System Task has some operations that only require one connection. If one of those operations is selected, for example, Delete File, there is only one connection property visible. It's important to set these key properties first so that the other related properties become visible. Originally, this was not the case. All the properties, even those that did not apply to the current operation, were visible simultaneously. The properties are now hidden when not needed because usability studies found that it was confusing for users to have those properties visible, even if they were disabled.


Access Methods

Many of the tasks provide different methods for providing a value for a property. By default, the package writer directly enters the value for a property in the task UI or the designer. For some properties, it's useful to retrieve the value from some other source. The options are as follows:

  • Direct Input The package writer directly enters the value into the task's user interface or it is configured somehow. Essentially, this tells the task that the correct value will be set on the property and the task need only retrieve the value to use it.

  • File Connection The file connection access method tells the task that it must attempt to open the named file and read the contents to retrieve the value for the property. For example, the SQL Task has the option to open a text file and read the contents of the file to retrieve the T-SQL script.

  • Variable This access method indicates to the task that the value for the property will be found in the named variable.

There is no formula for choosing which properties support multiple access methods, but some elements make it more likely. If one of the following is true, the property likely supports multiple access methods:

  • The object on which the task operates can be stored in different locations, such as SQL Server or the file system, as in the Execute Package Task.

  • The property points to a file system folder.

  • The property value can be a very long string, such as the SQL script for the SQL Task.

Connection Fix Up

Stock tasks appear to reference connection managers by name because the task displays the selected connection manager name. However, stock tasks actually store the ID of the connection manager and look up the connection manager by ID. This is so that if the connection manager name changes, the reference isn't broken.


Standard Tabs

The Standard tabs exist on every stock task UI.

The General Tab

The General tab, for most tasks, has two properties, the name and description for the task. The Name property is visible as the task name in the package designer. It can also be changed by selecting the task and clicking on the name and directly editing it there or by changing it in the task UI.

The Description property is useful for storing information about how the task is configured and any other information that can be useful for maintaining the task long term. There is no arbitrary limit to how long the description text can be.

The Expressions Tab

The Expressions tab is for entering property expressions. Property expressions allow a property value to be set by an associated expression. For more information about property expressions, see Chapter 9, "Using Expressions."



Microsoft SQL Server 2005 Integration Services
Microsoft SQL Server 2005 Integration Services
ISBN: 0672327813
EAN: 2147483647
Year: 2006
Pages: 200
Authors: Kirk Haselden

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net