Retrieving current task name

  • hi all,

    Currently I’m in difficult in dinamically founding from inside an ActiveX ScriptTask the name of the task itself.

    I know the trick for finding a step object in a package (in vbscript) given the step’s name.

    What I’m now looking for, is how to find the name of THE TASK while it is running, through a vbs code placed in the workflow script, without having to indicate the name of the task itself, or the name of the predecessor.

    What I would to do, is create an Error Handler system based on a task able to send alert e-mail via CDO and SMTP.

    I already have a Package for sending e-mail, and I wish call it from the package, where error handling is needed.

    In the outer DTS (the caller) I use an ExecutePackage task that invokes the EH package. I’d like to cut-and-past this task, without changing anything, as long as I need to handle and notify the failure of a critical task.

     Any ideas?

    thank you

    marco

  • There is no method of determing the name of the task itself. I have a similar setup for my error handling and had to manually put the task name in each of my calling scripts

    I'd really like something like DTSGlobalVariables.Parent to return the current step/task from which you can derive the name.

     

    --------------------
    Colt 45 - the original point and click interface

  • May be a round-about cludge; but you can get the collection of steps in the package... Check the ExecutionStatus property of each... This should give you the current Step Name.  The Step also has a TaskName property that you could derrive the current execution task.  This would surely not work of you have steps that execute in parallel.

    -Mike Gercevich

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

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