Extending the Package with the Script Task

The Script task extends the run-time capabilities of Microsoft Integration Services packages with custom code written in Microsoft Visual Basic 2008 or Microsoft Visual C# 2008 that is compiled and executed at package run time. The Script task simplifies the development of a custom run-time task when the tasks included with Integration Services do not fully satisfy your requirements. The Script task writes all the required infrastructure code for you, letting you focus exclusively on the code that is required for your custom processing.

A Script task interacts with the containing package through the global Dts object, an instance of the ScriptObjectModel class that is exposed in the scripting environment. You can write code in a Script task that modifies the values stored in Integration Services variables; later, the package can use those updated values to determine the path of its workflow. The Script task can also use the Visual Basic namespace and the .NET Framework class library, as well as custom assemblies, to implement custom functionality.

The Script task and the infrastructure code that it generates for you simplify significantly the process of developing a custom task. However, to understand how the Script task works, you may find it useful to read the section Developing a Custom Task to understand the steps that are involved in developing a custom task.

If you are creating a task that you plan to reuse in multiple packages, you should consider developing a custom task instead of using the Script task. For more information, see Comparing Scripting Solutions and Custom Objects.

In This Section

The following topics provide more information about the Script task.

Integration Services icon (small) Stay Up to Date with Integration Services

For the latest downloads, articles, samples, and videos from Microsoft, as well as selected solutions from the community, visit the Integration Services page on MSDN or TechNet:

For automatic notification of these updates, subscribe to the RSS feeds available on the page.