Execute Package Task in Loop cannot set FailParent to false
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, but when I save the package this property is set back to true. When I read about Parent-Child executions I find lots that leads me to believe I should be executing child out of process to accomplish this. Can anyone say whether FailParentOnFailure = False should accomplish this? Why I cannot set that property? Whether out-of-process is needed in my case? Control Flow snippet: http://www.flickr.com/photos/59568813@N05/ TIA, Josh
April 13th, 2011 11:58am

I do not see how the out of process is related, make sure FailPackageOnFailure is set to false for the ForEachLoop and Execute Package task.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2011 12:28pm

Thanks for your reply. I can set the FailPackageOnFailure to False for both the Loop and the ExecPackageTask. But I still cannot set FailParentOnFailure of ExecPackageTask to False. When I save the package I can see the property setting back to True. If another task in the loop fails I do want the loop to fail and package to fail so, if I understand the affects of these properties, it seems I don't want the FailPackageOnFailure = False on Loop Container. Why can't I set FailParent = False on ExecutePackageTask? TIA, Josh
April 13th, 2011 12:34pm

At this stage the inability to set this property to what you want sounds odd to me. Are you sure you get no errors? If not and it just jumps back to True then start to construct a new package that has a slimmed down functionality-wise appearance from the original one keeping in mind you want to see at what stage the property becomes stubborn.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2011 12:57pm

Okay the inability to set the property was a silly thing. It had that property being set to true in expressions for some reason. So now I can set FailParentOnFailure = false on ExecutePackageTask. 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. TIA, Josh
April 13th, 2011 1:23pm

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

Other recent topics Other recent topics