i have followed all the steps which u have explained, even then i am not able to get my result.
Let me explain you my requriment. I have an Execute process task in Control flow. If i get any error in this task, i will read the error message and write it in to a variable from OnError EventHandler. From OnTaskFailed EventHandler i have one more Excute Process task which will send the mail with the error message.
Steps which i followed are
1.FailPackageOnFailure property is set as True on the Execute process task in the package control flow.
2.I added one script task along with other tasks in the OnError EventHandler and i set ForceExecutionResult for this script task as Failure.
3.I kept all the tasks in the OnErrorEventHandler in the ForLoop Container and i set FailPackageOnFailure property is True on the For Loop container.
4.For all the tasks inside the ForLoop container i set FailParentOnFailure as true in the OnErrorEventHandler.
5.I kept all the tasks in the OnTaskFailed EventHandler in the ForLoop Container and i set FailPackageOnFailure property is True on the For Loop container.
6.For all the tasks inside the ForLoop container in OnTaskFailed EventHandler, i set FailParentOnFailure as true.
when i run this for the first time ,i am getting an error in the last Script Task in OnErrorEventHandler and it is not moving to the onTaskFailedEventHandler. For the Second time if i run with out deleting the checkpoint i am getting the same result as before.
What i actually required is, if i run the package both OnError Event Handler and ONTaskFailed EventHandler must be triggered with or without checkpoint.