none
How to let Execute Process Task be successful if there are two SuccessValues

    Question

  • I have a package which executes a batch file using an Execute Process.  Both 0 and 255 are "Success" and anything else is an error but the Task Editor only allows 1 SuccessValue and I have no idea how to get past this.  I have tried the Precedence Constraint Editor, but it does not seem to understand the attributes of the Execute Process Task.  This should be easy, but HELP!

    Thanks,

    Mike

    Monday, September 16, 2013 2:53 PM

Answers

  • In the BAT file I said above. The last error code returned should be 255, I have no idea how you get these two (0 and 255). I'd create an interim variable in the script to capture the error code of process 1 then 2 and sum them up. But this is DOS programming, not SSIS, this is how far you can go. Or break the BAT into two Execute Process Tasks.

    Arthur My Blog

    • Marked as answer by Mysetdancer Monday, September 16, 2013 4:23 PM
    Monday, September 16, 2013 3:21 PM

All replies

  • Why don't you manipulate on the returned values in the batch in this way: sum them up. So expect 255 only for success.

    Arthur My Blog

    Monday, September 16, 2013 3:06 PM
  • I do not see any built-in ability to do what you suggest, so I assume you are suggesting that I code something somewhere.  But where?  In the bat file itself?  I would have no idea how to do that. I had assumed that an Expression might do this, but I don't see how at this time. 

    Monday, September 16, 2013 3:10 PM
  • In the BAT file I said above. The last error code returned should be 255, I have no idea how you get these two (0 and 255). I'd create an interim variable in the script to capture the error code of process 1 then 2 and sum them up. But this is DOS programming, not SSIS, this is how far you can go. Or break the BAT into two Execute Process Tasks.

    Arthur My Blog

    • Marked as answer by Mysetdancer Monday, September 16, 2013 4:23 PM
    Monday, September 16, 2013 3:21 PM
  • Now I understand.  I can't change the bat file so I guess we are done.
    Monday, September 16, 2013 4:22 PM