![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have a problem in dts package workflow implementing activex script... I have a dts package which contains several steps. If everything goes well, email is sent to support persons. But they requested to be informed even if dts package failed (customized message, so I cannot use Operator notification). The only way (at least I think so) is to use ActiveX workflow control on the last step (send an email about dts failure). So the goal is to execute this step if eather one of previous steps failed. For this I'm using the following script: Function Main() dim oPkg Set oPkg = DTSGlobalVariables.Parent ' If eather one of the previous tasks failed, execute this task If (oPkg.Steps("ActiveX Task 1").ExecutionResult = DTSTaskExecResult_Failure OR oPkg.Steps("FTP Task 1").ExecutionResult = DTSTaskExecResult_Failure ) Then Main = DTSStepScriptResult_ExecuteTask Else ' I'm turning off this task (sending an email with unsuccessful ftp export notification)... Main = DTSStepScriptResult_DontExecuteTask End If End Function Even if I generate "ActiveX Task 1" to fail, last step doesn't get executed (Message from error log: "Step 'DTSStep_SendingFailureEmail' was not executed"). Email is not the reason, because sending emails in case of successful dts execution works.... Does anybody have idea why? Thanks, Peja |
![]() |
| Thread Tools | |
| Display Modes | |
| |