September 14, 2012 at 6:36 am
Hi everyone,
I have a script task with a validation. On failure, I wish to branch on a Execute SQL Task to send an email and then go to the step after the Scrip Task, and on Success, just go to the next step.
If Not (LowSize) Is Nothing Then
Dts.Variables("User::strLowSize").Value = LowSize
Dts.TaskResult = ScriptResults.Failure'Go to step "Send Email SQL Task" then on Success 'Go to step "BulkInsert SQL Task"
Else
Dts.TaskResult = ScriptResults.Success 'Go to step "BulkInsert SQL Task"
End If
Because it is successfull it does not go to next step. Is it because I cannot have a Failure branch and a success branch?
September 14, 2012 at 6:41 am
infodemers (9/14/2012)
Hi everyone,I have a script task with a validation. On fail, I wish to branch on a Execute SQL Task to send an email and then go to the step after th
___________ ______________
| Script | Failure | Execute |
| Task |--------->| SQL |
|__________| | Task |
|S |_____________|
|u
|c
|c
|e
|s
_____ V
|__________ |
OK. And your question?
If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.
September 14, 2012 at 6:47 am
Good point, I accidentaly submited my post before i was finished. now It is ok ! 🙂
September 14, 2012 at 6:52 am
Cool. I'm a bit short of time so can't go into detail.
But what you need to use is a package variable. Set its value in the script depending on the path to be followed (Yes/No, path1 path2, whatever).
And then use precedence constraints after the script task to direct the program flow, depending on the value in the variable.
If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.
September 14, 2012 at 8:14 am
September 14, 2012 at 9:31 am
I'm sorry, that link does not work for me ("Sorry, that page was not found." is the message I receive)
If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.
September 14, 2012 at 9:40 am
September 14, 2012 at 10:01 am
OK, I see that one.
I think your problem may be that your flow can go down either one path or the other, but not both.
The Execute ... task is waiting for both inputs to complete before proceeding.
You need to change them to be 'logical or' conditions - so that processing continues when either one completes.
See here for more info.
If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.
September 14, 2012 at 10:21 am
Hi again,
I got it working...The link in your last reply helped me a lot!
Thanks a lot again!
😉
September 14, 2012 at 10:50 am
Excellent - no problem.
If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply