|
|
Question : DTS programming - exit package
|
|
An ActiveX Script Task in one of my DTS package checks a global variable value and decide if the next step is executed. Now I set the Task to failure to halt the whole workflow. I want to find a syntax which can achieve the same without failing the task.
Another way I can think of is to get reference to package and set the package to nothing if xxx is null. Is Like those code commented out. Is it a good way? Or Is there a better way?
Function Main() Main = DTSTaskExecResult_Success
If IsNull(DTSGlobalVariables("xxx").Value) Then Main = DTSTaskExecResult_Failure ' Dim opkg ' set opkg = DTSGlobalVariables.Parent ' set opkg = nothing End If End Function
Thanks.
|
Answer : DTS programming - exit package
|
|
1.. to skip a step step by step example : http://www.sqldts.com/default.aspx?214
2. to disable the next step (and if its the last step the package will end) Set oPkg = DTSGlobalVariables.Parent ' Diable the workflow path we are not using oPkg.Steps("Stepname").DisableStep = true set oPkg = nothing
3. (for interest sake - how to handle mutlple workflows step by step example) http://www.sqldts.com/default.aspx?218
HTH
|
|
|
|