|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 7:01 AM
Points: 17,
Visits: 102
|
|
I have an SSIS package where I am processing some files in a ForEach loop. In the loop I have a data flow task which does the processing. I have made sure that the loop doesn't stop even if there is bad file by setting the maxerror count of the loop to '0'. I tried to catch the error in a message box using the script task on 'ON ERROR' Event handler of the loop container. Instead of getting one error , I get three. 'Popagate' is set to false on the data flow’s OnPostExecute event. Please help.
Main package - Loop Task - Data Flow Task
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Today @ 7:06 AM
Points: 693,
Visits: 1,028
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 7:01 AM
Points: 17,
Visits: 102
|
|
it's just a custom error that i am populating using the script task on the 'ONERROR' handler of the Loop. The problem is, it is getting populated 3 times.
Attached is the screenshot of the package. & the error that I am populating is "file XYZ couldn't be processed".
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Today @ 7:06 AM
Points: 693,
Visits: 1,028
|
|
That sounds correct if you have 3 files that are failing?
Instead of using the OnError event to run a script task, can you use the failed precendence constraint on the ForEach loop container to run the script task?
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 7:01 AM
Points: 17,
Visits: 102
|
|
3 errors are coming for 1 file. I want to make sure that the loop goes on executing even if the processing of one of the files fails. Also I want to send a mail for the corrupted file, which i am sending through the script task of the event handler. This problem will also occur if i want to log the error messages. It will be logged thrice and not a consolidation of the same error of the same file.
|
|
|
|