Sequence container not to fail if a task fails inside it

  • hi All,

    Just need a steer...in that i have a sequence container with 3 tasks

    i need to go down the failure route if all 3 fail but down the success

    route if at least one of them succeeds. What would be the de facto way

    of programming this.

    NOTE : On the failure i do not want the sequence container task to fail.

    only to go down the failure route...

  • Hi Robin,

    If you set the MaximumErrorCount property on the Container to 3, that should do it. It defaults to 1 and so fails on the first error. You have three tasks inside, so a MaximumErrorCount of 3 should cause the Sequence Container to fail while 2 or less will allow it to succeed.

    Also, if you're using Precedence Constraints to connect the tasks inside the Container and using the Constraint Evaluation option, be sure to change them to Completion.

    You have to have the Sequence Container fail to utilize a Failure Precedence Constraint. But, as with the tasks inside the Sequence Container, this doesn't have to stop execution. The package also has a MaximumErrorCount property accessible from the Control Flow itself. You can set it to some number higher than the default (1) to have allow execution to continue after an error. Remember the part about using Completion Precedence Constraints earlier though.

    As Julie Smith taught me, you set the MaximumErrorCount property to 0 to ignore all errors at the package level. this won't work for the Sequence Container because you want to trigger a Failure Precendence Constraint on the third error, and the only way to do that is to have the container fail on error #3.

    Hope this helps,

    Andy

    Andy Leonard, Chief Data Engineer, Enterprise Data & Analytics

  • thanks Andy...I'll give it a go

  • Hi Andy,

    I have opposite problem. I have sequence containter in which I have two script. I want the container to get fail when one task fail but it is not happening. Andy, any help will be highly appreciated.

    Thanks,

    Syed

  • Hi Syed,

    The scenario you describe is the default behavior. Make sure the MaximumErrorCount property of the Sequence Container is set to 1 (the default), the ForceExecutionResult property is set to None (the default), and the ForceExecutionValue property is set to False (the default).

    Hope this helps,

    Andy

    Andy Leonard, Chief Data Engineer, Enterprise Data & Analytics

  • Thanks Andy for your reply. However, I have all those condition set what you have metioned but it is still failing. Does it matter if the two script task running parallel in the sequence container which is condition in my package. There are two script task running in the parallel in sequence container. Any help will be highly appreciated.

  • Long shot but if I've understood this correctly, you don't want error in your tasks to bubble up to the sequence container?

    If that's the case then why not add an onError even handler and then from the variables window set the system variable Propagate to false. You can create a variable for error count and increment that by one for each task. At the end if the count is three then you go down one route if less than 3 you go down the other?

    Hope that makes sense?

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • Thanks Andy for your quick reply. That make sense, let me try it and will let you know the result.

  • Thanks Andy for your quick reply. That make sense, let me try it and will let you know the result.

  • Is this what you're after?!

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • Thanks Abu Dina. Actually this is not what i am looking for but it is close to it. The only difference is that in my case one of script task in the sequence container keeps on running while other fails. so when one script task fail the package should stop even the other script task is running.

  • Thanks Abu Dina for your reply. I my case one script task keep on running while other fails.

  • Can you please guide me how you achieved this? I want to redirect flow from sequence container to a task in case nay task inside sequence container fails? Exactly what you are doing in your third image. I would appreciate any help.

    Thanks

Viewing 13 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply