![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Greetings all. SQL Server 2000, sp3a Trying to concoct an ActiveX script task that is a generic error processor - taking the exception file(s) and description of the task that just failed (the previous step in the workflow) and dynamically adjusting properties on the SendMail task to attach the exception files and include error detail (the next step in the workflow). I have it written and working great. The only catch is that, in its current form I have to explicitly set constants in its code to the name of the previous and subsequent steps in the workflow so I can retrieve data and/or adjust properties in them. It seems logical to me that an executing ActiveX task ought to "know" what its own name is. If I were able to retrieve the name of the step from its own code, it would be easy enough to then derive the step name that's downstream from its precedence constraint, find the step whos constraint is set to it, and make the code completely generic. Sadly, I haven't found any way for an executing step to set a reference to itself at run time. I use this step in about 100 different places in the package and that's what is driving the need to make it generic. Would be great if I could just cut and paste it each time I need to add a new section to the package. Plus it would eliminate the possibility of a typo in hard-coding the step names. Thanks in advance for any advice! |
![]() |
| Thread Tools | |
| Display Modes | |
| |