SSIS 2012 Skipping Final Step
I have an SSIS package, where the final task is to send an email with the message body based on a variable. I tried this first using a "Send Mail Task", but it was being skipped (executing through Data Tools on development machine). I then tried creating a Script Task and passing SMTP the server credentials with System.Net.Mail, and it worked fine yesterday, but today, again, it is skipping the last step. I have 6 different script tasks to set the message body variable, based on different conditions, which all point to this final script task "on completion". All steps, except for the final script task get executed. I've tried changing them to "on success" or "on failure". No luck. Stepping through the rest of the package, the variable is accurately being set at whichever step previous to the last one sets the variable. I've even tried commenting out all of my code and putting a simple debug.print line into the final script task, and again it it being skipped. One question that comes to mind is there any limit on the number of tasks that can output to a common script task? Any other ideas as to what may be causing this issue? I would appreciate any help that can be offered. Thank you.
June 11th, 2012 3:57pm

outputting to a common script task from a number of other tasks is what you are doing? I think you dud chain then wrong, can we see a picture of your package?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
June 11th, 2012 4:01pm

Are you certain that you don't have an expression on one of the precedance constraints? Fx symbol by one of the linesChuck Pedretti | Magenic North Region | magenic.com
June 11th, 2012 4:04pm

Hi Arthur, I'm doing a series of steps, that end with a script task to set a message variable which passes to a step, which sends the email. If any step of the package fails, I go to a different script task to set the message variable to note where the package fails, and then whichever script task sets the message continues on to the task to generate the message:
Free Windows Admin Tool Kit Click here and download it now
June 12th, 2012 9:55am

You need to double click on one of the lines going into SCR Email Results and switch to OR Otherwise all of the inputs have to complete for your last task to fire - which is impossible Chuck Pedretti | Magenic North Region | magenic.com
June 12th, 2012 10:01am

Hi Chuck, I'm not sure what you're asking. Please review the above image I submitted in reply to Arthur (while all of the contraints are "success", I originally had them set as on "completion", but there is no behavioral difference). The last SCR Email Results task is skipped. I didn't know there is a way to put an expression on a constraint, or do you mean within the script of the preceeding task? If so, there are expressions in those to set the message variables. On a side note, when running it manually, checkmarks go to every step (including the SCR Package Successful step) but totally skips the SCR Email Results step; however, the package in debug mode completes reporting success:
Free Windows Admin Tool Kit Click here and download it now
June 12th, 2012 10:08am

I would use the Event Handlers to achieve what you want. Simply move the SCR <name> Error to an event handler corresponding to its own step. The last step does not complete because you need all the green arrows to arrive to it. You may never have that happening, perhaps you can double-click on each path and make it conditional (or) thus using a constraint, but debugging/testing out all the variations may be a tad tedious IMO.Arthur My Blog
June 12th, 2012 10:21am

Hi Chuck, I'm not sure what you're asking. Please review the above image I submitted in reply to Arthur (while all of the contraints are "success", I originally had them set as on "completion", but there is no behavioral difference). The last SCR Email Results task is skipped. I didn't know there is a way to put an expression on a constraint, or do you mean within the script of the preceeding task? If so, there are expressions in those to set the message variables. On a side note, when running it manually, checkmarks go to every step (including the SCR Package Successful step) but totally skips the SCR Email Results step; however, the package in debug mode completes reporting success: Your picture shows the problem. The one with the checkmark actually executed - none of the others do. Double click on one of the green lines and change it to OR, then it will work. (All lines will then be dashed indicating an or condition) Chuck Pedretti | Magenic North Region | magenic.com
Free Windows Admin Tool Kit Click here and download it now
June 12th, 2012 10:36am

The "OR" did it. Thank you so much!
June 12th, 2012 10:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics