SSIS Error Handling - passing the parent task name

Hi all,

I've been using SSIS for a while but am having my first foray into proper error handling. I've got a load of data flow tasks and I'm setting up an OnTaskFailed event for each one. The event is an Execute SQL Task component running a stored proc which I want to insert the name of the offending task into an error log table.

The problem is getting the name of the task that failed. If I select the System::TaskName variable, it sends the name of the Execute SQL Task component, rather than the name of the task that actually failed.

So how do I get the Execute SQL Task component to send the name of the Data Flow task to the stored proc, rather than its own name?

Thanks

I've worked out a solution. Its neither clever nor elegant but it works. I've changed the name of the Execute SQL Task that appears in the error event so it has the same name as the data flow task that it covers.

So even though it is the name of the wrong task that finds its way to the error log table, it is the same name as the task that failed so at least I can now see which tasks are failing..