I have always found that workflow scripts are hard to manage because you can't see them in the designer. When you go to edit old packages that you have forgotten or someone elses code it is hard to figure out what is going on when steps don't fire because of the workflow script. Instead I use activeX scripts to enable and disable future steps based on previous actions. These are easier to maintain because youcan see the step in the designer.
I use the following subs to set precedence and diable steps.
sub setprec(dest,src)
Set oPkg = DTSGlobalVariables.Parent
Set Destination = oPkg.Steps (cstr(dest))
Set Source = oPkg.Steps (cstr(src))
Set Prec = Destination.PrecedenceConstraints.New(Source.name)
Prec.PrecedenceBasis = DTSStepPrecedenceBasis_ExecResult
Prec.value = DTSStepExecResult_Success
Destination.PrecedenceConstraints.Add Prec
Destination.DisableStep = False
end sub
sub chkfiles(flnm,tsk)
set fso=createobject("scripting.filesystemobject")
if fso.fileexists (flnm) then
DTSGlobalVariables.Parent.Steps("DTSStep_DTSDataPumpTask_"&tsk).DisableStep = False
setprec "DTSStep_DTSExecuteSQLTask_2","DTSStep_DTSDataPumpTask_"&tsk
else
DTSGlobalVariables.Parent.Steps("DTSStep_DTSDataPumpTask_"&tsk).DisableStep = True
end if
end sub