SSIS: OnPostExecute OnError issue - ssis

I have a SSIS package where I set the OnError and OnPostExecute event handlers.
The Package is a simple loop container and the handler OnPostExecute is working fine.
But the OnError is not actually working. Ive added some wrong-code to the task inside the Loop, just for the sake of testing the OnError handler and it's not activating. The OnPostExecute handler does work after very process inside the Loop.
On the other hand, Ive tried executing the OnError task by its own and it did work. So, it's not being activated when an error happens.
Some information. I have set the Propagate system variable to FALSE for every task inside the loop since I dont want the package to stop. (maybe this has something to do with it)
The OnError handler is at package level.
Any idea about OnError not being executed when the process finds an error?
Thanks

Check the "DisableEventHandlers" property. Make sure it is set to false on any of the tasks that it is not firing.

Related

Error: The variable "System::ErrorDescription" was not found in the Variables collection. The variable might not exist in the correct scope

I have created a SSIS package for migrating data from one sql server database to another. The tasks are created in a sequence container.
I have created events in the event handler and added the send mail task for sending email and getting the following error. I get this error even when I try to evaluate the expression in the expression builder. Please note that I am getting the error on the onTaskFailed event handler. I think the system error variables are not accessible in that event. Do I really need that event handler
I can see the variable in the collection. Not sure of how the scope affects it.
This is definitely a scoping issue. The system variable 'ErrorDescription' is only avialable at 'OnError' event handler and can't be used in 'TaskFailed' event handler. As to the question of if you need it or not, that is something your business logic should dictate. I would suggest to move your code to 'OnError' event handler.

Excel Source validation error not firing Data Flow task fail event

I have a package with a Data Flow task containing Excel Source. DelayValidation is set to True for the Data Flow.
There is an event handler OnTaskFailed at package level. However if the Excel Source validaton fails the OnTaskFailed handler does not execute. It seems the validation error does not fire Task Failed event.
Is it possible to configure it to fire the Task Failed event?
I think in your case, instead of setting up at the package level, you should set it at the data flow task level. What I mean is, in the event handler pane you can change the executable to the certain data flow task.

What's the difference between failparentonfailure and propagate in SSIS

What's the difference between failparentonfailure property and propagate variable of event handler in SSIS?
What's the difference between error event handler and task failure event handler in SSIS?
FailParentOnfailure is for failing a parent container despite of setting the MaxErrorCount on the parent container (for loop, foreach loop, etc.). The Propagate solution is for preventing event propagation to the parent. See http://microsoft-ssis.blogspot.com/2014/05/continue-loop-after-error.html

Waiting for a file to be loaded in Actionscript 3

I am reading files from disc that have information I need to display to the user. I set up an event listener that flags when the file is loaded- that's easy. However, that adds a delay before I can display the information, and it appears that doing a simple loop in the main code to wait for the file to be loaded does not work:
while (fileComplete == false);
Essentially that simply freezes the code- the file does not load while that loop functions. I can add a timer that checks every few milliseconds to see if fileComplete == true, but I'm wondering if there is a better way. Ideas?
Flash is by default single-threaded, this means if you're initiating an asynchronous process, you need to release the code flow for Flash engine to actually complete the process. Doing an infinite loop like yours does NOT release the code flow, so you should drop this idea. Instead, you should either blindly wait for Event.COMPLETE event and do the post-load actions in the listener, or you should listen for Event.ENTER_FRAME and check for the flag you're setting in Event.COMPLETE listener. The former approach is cleaner.

Event Handler precedence in SSIS

I have OnPostExecute event handlers on all my control flow elements, but as soon as I put a OnError handler on the package level, I dont see the task level handlers anymore.
Is this a known bug or is it something that I am doing wrong.
This is because the OnPostExecute event handler is created at each package task. The package level indicates an OnPosteExecute event on all tasks.
What do you mean you don't see them? Do you mean that the only thing listed under Event handler in bold is the OnError for the package?
If so, fear not, all of your package OnPostExecute events still exist. The trick is the focus of your cursor when you clicked Event Handlers was on the Package. To see event handler's associated to a given Executable, either click back to the Control flow, click your given executable and then click Event Handler. The easier way is to just use the Executable selector bar and drill into it.
I had defined an OnPostExecute event on my Execute SQL Task so I clicked that and selected OK.
Now I can see the event for that Executable
If you don't want to spend your life clicking through various executables trying to find something, the Package Explorer tab is amazingly helpful in this regard and one that I find people don't use.
Here you can quickly see I defined 2 event handlers on my Execute SQL Task, one for OnPostExecute and one of OnError, in addition to the OnError event I have defined at the package level.
Finally, a quick note about order of operations. Given my scenario of OnError event handlers defined on the control flow elements and the Package level and an OnPostExecute event on the control flow elements, when my Execute SQL Task raises the error (divide by zero), I will see
"Execute SQL Task"'s OnError event fires
"so_EventHandlerRajiv"'s (package) OnError event fires
"Execute SQL Task"'s OnPostExecute event fires
So, OnError will fire before OnPostExecute and one a given Event Handler begins firing, it will percolate up to all the listening handlers.
Maybe you can use the package explorer to see all the defined event handler instead clicking on the properties of each control flow task.
mario
http://msdn.microsoft.com/en-us/library/ms190114.aspx