Execute package task always returns success

  • Hi, everybody!

    I created DTS package with a couple of global variables defined. Let's call it a child package. I then created another package (parent package) which calls the child package using "Execute Package Task" and passing appropriate global variables in the process. A parent package has several of those "Execute Package" tasks which differ only in the value of global variable they pass to the child package.

    The problem is that even when the child package fails (which is clearly indicated by the logged information and by the red dot, when I run it manually), the "Execute Package Task" still follows its OnSuccess precendence instead of the one "OnFailure".

    Has anyone encountered anything like that?

    Thank you!

  • To test what I think is going on here I did the following. I created a very simple Child package containing ActiveX script with only this:

    Main = DTSTaskExecResult_Failure

    Which means that this task will always fail.

    I then created a parent package which calls the first one via "Execute Package Task". I then created OnSuccess and OnFailure tasks (just sending myself an e-mail with "success" or "failure" for a subject). When I ran it, the "Execute Package Task" of course failed, but then the OnSuccess task got executed.

    Looks like a bug to me, or am I missing something?

    Thank you!

  • You have to set in child package properites logging Tab:

    Fail Package on First Error.

    Otherwise even the task (or rather step) fails the package does not - and your calling package still assumes the called package succeeded.

    Tom

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

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