Bandwidth Monitor
Skip the execution of an individual Task
By Darren Green
Page 1 | Page 2 | Page 3

It is easy to build a nice linear workflow path using the DTS designer, but unfortunately our processes are not always that simple. In certain circumstances you may wish to skip a task. This is where the power of workflow can be used, but unfortunately it is not available graphically through the designer.

Take this simple package as an example-
Skip Task

1 The first task contains the decision making code as to whether or not we wish to follow the full workflow, or skip a task. For illustrative purposes this is a simple Yes or No message box, and the decision is stored in the global variable SkipTask as a boolean value.

' Pkg 214 (SkipTask - 1)
Option Explicit

Function Main()

	Const vbYes = 6
	Const vbYesNo = 4
	Dim lResult

	lResult = MsgBox("Do you wish to skip the next task?", vbYesNo)
	If lResult = vbYes Then
		DTSGlobalVariables("SkipTask").Value = True
		DTSGlobalVariables("SkipTask").Value = False
	End If
	Main = DTSTaskExecResult_Success
End Function

Page 1 | Page 2 | Page 3