Friday, February 24, 2012

Avoid Package Failure

Hello everyone

i'm using a Foreach Container to run certain tasks, these ones are inside a Sequence Container. I'd like to know if there is a way to have a task failure without a foreach failure, i don't need the hole process to fail, just the current iteration so i can log it.

Thanks a lot!

You may want to check FailParentOnFailure and FailPackageOnFailure properties of your inner tasks. I have not played with those but it seems like prove what you need.

Rafael Salas

|||Use an event handler.

Set the [System::Propagate] to false in an OnError handler in the inner tasks. That way, errors won't bubble up to the Foreach loop and cause it to fail.|||Thanks a lot

I used set maximum error count to a number fairly reachable, but i think it's not a good practice. I'll try your suggestions right now.

regards.|||Hello again,

I'm having the same problem, I did what you told me, on the OnError event handler I use a script where i change the Propagate variable to False. But there's a problem with the MaximumErrorCount property. Watching on the Execution Results tab, i figured out that the package fails because of the MaximumErrorCount property overpassed the foreach's number.

Well i have to say that inside the foreach Container there is a Sequence Container, and inside this one, there are 12 tasks, and i don't know if it could be stopping the package.

any suggestion?

regards.|||

I was referring to setting the OnError event handler on the failing inner tasks, however, I believe it would work just as well as on the sequence container, as long as its configured as depected.

└───ForEach
├───Sequence (<= OnError event handler here )
├───Task 1
├───Task N

On which tasks or containers is the OnError Event Handler defined?

No comments:

Post a Comment