Showing posts with label executed. Show all posts
Showing posts with label executed. Show all posts

Wednesday, March 28, 2012

Precedence Constrains

Hi there!

I've a few tasks in my dataflow. Some of them are executed depending on an precedence constrain. Works fine.

The problem is following: I want to write a success message (execute SQL task), when all the tasks who have been executed have done this with success. For example, i ve ten tasks, and 2 of them are executed (successfully). This is good, i want to execute my task to write the success message.

I tried to set these precedence constraints with EvalOP = ExpressionOrConstraint, Values = Success and an expression, what returns TRUE, when the task above is not executed (the condition from a precedence constraint above). But the task to write my message will never be executed, because it seems the task does'nt give any result (neither success nor failure) when they ar not executed, and so my AND-Constraint for the success message task will only get TRUE, when ALL task are executed (and successful).

Is there any chance to get somethink like "isSuccess OR IsNotExecuted" into a precedence constraint?

Thanks, Torsten

Put all the tasks in a Sequence Container and then have a precedence constraint to the SQL Task with an on success constraint.|||

I had the same idea, and it seems to be the only workaround. But in these way it is not possible to realize an individual errorhandling of each task.

I think i can live with that. Thanks a lot,

Torsten

Monday, March 26, 2012

Pre and PostExecute Event handler called more than once

I have a task configured on the post execute event handler of a package expecting this task to be executed only once after the completion of all the other tasks in the package. But I found the task configured on the post execute event of the package getting executed as many times as the number of tasks in the package + 1 . Is there any workaround for this problem?

Yes,

The reason this happens is that events "bubble-up" from a container to all parent containers and are caught by any eventhandlers that exist on those parent containers.

To stop this behaviour you'll need to create an eventhandler scoped to each task's OnPreExecute & OnPostExecute eventhandlers and set [@.System::Propogate]=FALSE. This will stop the event "bubbling-up".

-Jamie