dbTalk Databases Forums  

ActiveX Workflow

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


Discuss ActiveX Workflow in the microsoft.public.sqlserver.dts forum.



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

Default ActiveX Workflow - 07-17-2003 , 10:38 AM






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

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

Default Re: ActiveX Workflow - 07-17-2003 , 03:47 PM






Hi Peja,
Maybe this article can help you.
http://www.sqldts.com/default.aspx?6,103,218,7,1
JFB

"Peja" <PedjaDivac (AT) yahoo (DOT) com> wrote

Quote:
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



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.