Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Sequence container not to fail if a task fails inside it Expand / Collapse
Author
Message
Posted Saturday, February 12, 2011 7:27 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, July 2, 2014 10:03 AM
Points: 69, Visits: 331
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...
Post #1062976
Posted Saturday, February 12, 2011 5:09 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, July 21, 2014 12:44 PM
Points: 389, Visits: 1,041
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
CSO, Linchpin People
Follow me on Twitter: @AndyLeonard
Post #1063056
Posted Tuesday, February 15, 2011 3:21 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, July 2, 2014 10:03 AM
Points: 69, Visits: 331
thanks Andy...I'll give it a go
Post #1064125
Posted Monday, April 15, 2013 3:43 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, May 20, 2014 12:48 PM
Points: 10, Visits: 85
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
Post #1442515
Posted Monday, April 15, 2013 8:09 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, July 21, 2014 12:44 PM
Points: 389, Visits: 1,041
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
CSO, Linchpin People
Follow me on Twitter: @AndyLeonard
Post #1442560
Posted Tuesday, April 16, 2013 7:37 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, May 20, 2014 12:48 PM
Points: 10, Visits: 85
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.

Post #1442737
Posted Tuesday, April 16, 2013 8:06 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, June 26, 2014 4:08 AM
Points: 708, Visits: 3,286
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

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
Post #1442759
Posted Tuesday, April 16, 2013 8:12 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, May 20, 2014 12:48 PM
Points: 10, Visits: 85
Thanks Andy for your quick reply. That make sense, let me try it and will let you know the result.

Post #1442763
Posted Tuesday, April 16, 2013 8:45 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, May 20, 2014 12:48 PM
Points: 10, Visits: 85
Thanks Andy for your quick reply. That make sense, let me try it and will let you know the result.

Post #1442783
Posted Tuesday, April 16, 2013 10:41 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, June 26, 2014 4:08 AM
Points: 708, Visits: 3,286
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

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
Post #1442859
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse