workflow on failure did not work

  • I have a DTS package, the first step is checking the size of a text file if it fails, I have a On Failure link to point to a Execute SQL procedure task to issue an email.  However when the size check failed, the DTS package failed, it did not go to exec the SQL to issue an email. I already made sure that the logging of failed package on first error was unchecked.

    Here is the check script

    Function Main()

    Dim pkg

    Dim fso

    Dim strFileName

    Dim aFile

    Dim Size

     Set pkg = DTSGlobalVariables.Parent

     Set fso = CreateObject("Scripting.FileSystemObject")

     strFileName = DTSGlobalVariables("TextFileName").Value

     Set aFile = fso.GetFile(strFileName)

     Size = aFile.Size

     If Size = 0 then

      Main = DTSTaskExecResult_Failure 

              else

      Main = DTSTaskExecResult_Success

     end if

     

    End Function

    Can anyone tell me why the on failure link did not work?

    Thanks a lot.

     

     

  • I would like to know too!

    This is what I have been doing instead -

    1 - evaluate - set global var to indicate pass or fail.

    2 - take care of business - net send or sendmail, etc. and what ever else still needs to occur.

    3 - fail package if eval global says fail (activeX).

    4 - handle retry logic in the job that calls the package.

     

    [font="Courier New"]ZenDada[/font]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply