Your help and insight is greatly appreciated
In SSIS I need to ForceExecutionResult = Success for the Grandparent Container
This is how I have my package set up currently:
Parent Package = A
Child Package = B
- An Execute Package Task calls B from A
- If B fails with a specific error code, I retry B
I retry B by way of the OnError event handler in A's Execute Package Task using a Script Task.
To my way of thinking:
- A's Execute Package Task OnError event handler is the Script Task's Parent Container
- A's Execute Package Task is the Script Task's Grandparent Container
How do I ForceExecutionResult = Success for the Grandparent Container (A's Execute Package Task) when the B retry succeeds?
Right now even when the B retry succeeds, A's Execute Package Task still shows Red = failure as a result of the failure that happens on the first B attempt.
Looking for a programmatic way of doing this with C# or VB inside a script task.
I am using SSIS 2008
Thanks for reading
Main advise is not to rerun package B after OnError
event. You need to call B, make sure it does not fail package A, evalute outcome of package B and decide what to do.
Create a For Loop
container and make it run for a set number of times (= max numbers of runs, like in while i < 5 do
).
Set Execute Package
task not to fail parent and whole package on error.
Evaluate execution code in a Script Task
and exit For Loop
container on success / failure condition. (like by setting i=5).
Probably you can execute package B from C# Script Task
- check object model how to do that. I'll update my answer if I find how to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With