November 27, 2003 at 3:57 am
Hi all,
I have a DTS with some tasks within, all bound by OnSuccess arrows. For one particular task, I use OnFailure arrow to bound it to some other tasks, to force it to perform some other queries if the task fails. Well, I need the whole DTS execution ends with a success, even if that task fails. How can I reach this?
Thanks a lot!
tb
December 1, 2003 at 3:15 pm
You could use Workflow ActiveX scripts to control the program flow instead of the On Failure. Workflow scripts execute and 'decide' whether or not the task should execute. I use global variable flags to control when tasks without any precedance constraints should run.
Example:
Function Main()
IF DTSGlobalVariables("gvMyFlag").Value =1 THEN
Main = DTSStepScriptResult_ExecuteTask
ELSE
Main = DTSStepScriptResult_DontExecuteTask
END IF
End Function
Since DTSGlobalVariables("gvMyFlag").Value equals 0 when the property is last saved, this task will not run until I put the following code at the appropriate place in my package:
DTSGlobalVariables("gvMyFlag").Value = 1
objPackage.Steps("DTSStep_YourTaskHere").ExecutionStatus = DTSStepExecStat_Waiting
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply