FailParentOnFailure=False on ExecutePackageTask in Loop Container Won't Behave
Hi, I have an Execute Package Task inside a ForEachFile Loop. The Child Package executes once per file to stage the file. Upon success the file is moved to a processed folder upon failure the file is moved to error folder. This works great except when the child package fails, the parent package fails and stops processing the other files in the loop. I want it to move the failed file to error folder and continue executing for other files found in loop. Because I need to move the file differently dependant on Success\Failure of child package, I cannot set ForceExecutionValue. I assumed I could set the FailParentOnFailure = False on the Execute Package Task. However, the loop container and parent package both fail and execution stops upon the first failure of ExecPackageTask. This happens even though FailParent and FailPackage of ExecutePackageTask are both False. Aparently this property doesn't do what I think it should. Or perhaps something else is overriding the behavior. I have custom logging in OnPostExecute Events of both Parent and Child Packages. Do event handlers cause an error to propagate up regardless of FailParentOnFailure? Do I have to change some settings in MaxErrors or System::Propagate variable? BOL is so unclear about how all these settings work. I suppose there are too many possible combinations to document. Control Flow snippet: http://www.flickr.com/photos/59568813@N05/ TIA, Josh
April 13th, 2011 9:57pm

I really only use FailParentOnFailure for CheckPoint saving, not for general Control Flow. Any chance you can move your file-moving operations down to the child package? Or isn't there a way to propogate a child variable value back up to the parent? If so, use that to determine if the 'operation' was successful or not, and then use precedence constraints with and Expression to branch your flow. Hope this helps.Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2011 10:38pm

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

Other recent topics Other recent topics