dbTalk Databases Forums  

Re: Main = DTSTaskExecResult_Failure does not raise an error

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: Main = DTSTaskExecResult_Failure does not raise an error in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
SJM
 
Posts: n/a

Default Re: Main = DTSTaskExecResult_Failure does not raise an error - 10-03-2005 , 07:10 AM






Thanks for your reply Allan. I had tried just using Main =
DTSTaskExecResult_Failure in a script on Friday, but I also had a Main =
DTSTaskExecResult_Success after it. I.e.,

Function Main()

Main = DTSTaskExecResult_Failure

Main = DTSTaskExecResult_Success

End Function

I am unclear on when an error is raised by DTSTaskExecResult_Failure in
a script, does this immediately raise the error and return to workflow
and other steps or is the remainder of the script executed? When I tried
just

Function Main()

Main = DTSTaskExecResult_Failure

End Function

The failure was returned and package execution was stopped. This is a
big step forward from Friday.


*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #2  
Old   
SJM
 
Posts: n/a

Default Re: Main = DTSTaskExecResult_Failure does not raise an error - 10-03-2005 , 07:34 AM








The good news is that the error is raised. But the on failure workflow
is still not followed.

I have cleared the “Fail package on first error” on the package
properties, however, the package execution stops on the error. Are there
other settings elsewhere I need to change?


*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Main = DTSTaskExecResult_Failure does not raise an error - 10-03-2005 , 07:45 AM



I certainly had nothing other than the task return a failure to me.

"SJM" <nospam (AT) devdex (DOT) com> wrote


Quote:
The good news is that the error is raised. But the on failure workflow
is still not followed.

I have cleared the Fail package on first error on the package
properties, however, the package execution stops on the error. Are there
other settings elsewhere I need to change?


*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #4  
Old   
SJM
 
Posts: n/a

Default Re: Main = DTSTaskExecResult_Failure does not raise an error - 10-03-2005 , 08:36 AM





I appreciate your assistance with this matter Allan.

Ok, my DTS package workflow is still functioning oddly.

My package has 39 steps with on success workflows, i.e. step 1 to step 2
to step 3 etc. All of these steps had an on failure workflow going to an
activex script task. When I raised the error, the failure activex script
task wouldn’t run.

As a test, I deleted the on failure workflows and the failure activex
script task, recreated it, and created a single failure workflow from
the step that presently fails (on purpose). When I executed the package,
the error was raised and the failure activex script task ran. So I
created a second on failure workflow from another step to the failure
activex script task and executed the package, the error was raised and
the failure activex script task did not run.

Is there a limited to the number of on failure workflows that can be
used in DTS? Presently one works fine and two and beyond do not.

I welcome comments and suggestions on this matter.


*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #5  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Main = DTSTaskExecResult_Failure does not raise an error - 10-03-2005 , 08:48 AM



?

Do you have >1 On Failure workflow constraints going to the same task?

If yes then look here


Introduction to Workflow
(http://www.sqldts.com/default.aspx?287)

Allan



"SJM" <nospam (AT) devdex (DOT) com> wrote


Quote:
I appreciate your assistance with this matter Allan.

Ok, my DTS package workflow is still functioning oddly.

My package has 39 steps with on success workflows, i.e. step 1 to step 2
to step 3 etc. All of these steps had an on failure workflow going to an
activex script task. When I raised the error, the failure activex script
task wouldnt run.

As a test, I deleted the on failure workflows and the failure activex
script task, recreated it, and created a single failure workflow from
the step that presently fails (on purpose). When I executed the package,
the error was raised and the failure activex script task ran. So I
created a second on failure workflow from another step to the failure
activex script task and executed the package, the error was raised and
the failure activex script task did not run.

Is there a limited to the number of on failure workflows that can be
used in DTS? Presently one works fine and two and beyond do not.

I welcome comments and suggestions on this matter.


*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #6  
Old   
SJM
 
Posts: n/a

Default Re: Main = DTSTaskExecResult_Failure does not raise an error - 10-03-2005 , 09:28 AM




Indeed, so multiple on failure workflows is a cumulative AND operation…
that is the opposite of what I expected. Thanks for pointing that out.

So, is the alternative creating 39 identical activex script tasks and 39
identical send mail tasks (the activex task configures the content of
the send mail task, among other things) for each of the 39 steps in the
package? Is it possible to set the behavior of the failure workflows to
be an OR operator or some other option?


*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #7  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Main = DTSTaskExecResult_Failure does not raise an error - 10-03-2005 , 09:40 AM



You can do an OR yes (although not pretty)

Multiple Paths in Workflow
(http://www.sqldts.com/default.aspx?218)


Allan



"SJM" <nospam (AT) devdex (DOT) com> wrote


Quote:
Indeed, so multiple on failure workflows is a cumulative AND operation
that is the opposite of what I expected. Thanks for pointing that out.

So, is the alternative creating 39 identical activex script tasks and 39
identical send mail tasks (the activex task configures the content of
the send mail task, among other things) for each of the 39 steps in the
package? Is it possible to set the behavior of the failure workflows to
be an OR operator or some other option?


*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #8  
Old   
SJM
 
Posts: n/a

Default Re: Main = DTSTaskExecResult_Failure does not raise an error - 10-03-2005 , 10:00 AM





Okay, so am I correct in understanding it is possible to use 39 on
failure workflows going to the same activex script by adapting the code
at that link to allow the task to run with the failure of only one step
as an OR operation?

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #9  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Main = DTSTaskExecResult_Failure does not raise an error - 10-03-2005 , 10:12 AM



Never done that many to tell you the truth but the idea should be the
same yes. Let us know how you get on

"SJM" <nospam (AT) devdex (DOT) com> wrote


Quote:
Okay, so am I correct in understanding it is possible to use 39 on
failure workflows going to the same activex script by adapting the code
at that link to allow the task to run with the failure of only one step
as an OR operation?

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #10  
Old   
SJM
 
Posts: n/a

Default Re: Main = DTSTaskExecResult_Failure does not raise an error - 10-04-2005 , 01:25 PM



I appreciate your assistance Allan.

I'm not sure it’s worthwhile.

Creating 39 identical individual on failure activex scripts in each of
several packages is undesirable, as is trying to make the failure
workflow an OR operator for 39 constraints.

I am presently looking into other options for on failure workflow /
error handling before I proceed.


*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.