Friday, February 17, 2012

Event handler bubble up problem

The idea is that the severity 2 tasks are bubbled up to a single Event Handler. Tasks with severity 1 and 3 errors should not bubble up as they have their own event handlers. Lets assume the path between the inner severity 2 container and the severity 1 task is a failure path.

There are two problems appearing:

1. If Task A with Severity 2 and Task C with Severity 1 both error then each error is recorded twice:

a. Once when Task A with Severity 2 errors

b. Once more when Severity 2 Error Container B errors (with FailParentOnFailure set to True)

c. Once when Task C with Severity 1 errors

d. Once more when Severity 2 Error Container A detects the error even though Task C with Severity 1 does not have the FailParentOnFailure property set to true (I think)

2. Now here’s what’s crazy. It would seem by design that when Task E with No Severity (and hence no Event Handler) fails the Event Handler for Severity 2 Error Container A fires.

This would mean alot more if the jpg was visible but in the meantime...have you looked into changing the System::Propogate variable in the eventhandler. it stops events bubbling up to an eventhandler attached to a container further up the container hierarchy.

-Jamie|||Thanks for the speedy reply. Don't know why the jpeg didn't display. I have also posted this to the Betaplace forum, with the diagram as an attachment.

I will check out your suggestion|||Hi Jamie,

I have looked at the propgate variable, which sort of works. There are two issues with this:

1 - You have to create "dummy" event handlers for the task you want to bubble up an event for. Otherwise this variable is not available.

2 - All of the variables are called the same, and the scope is given a really helpful "onError". So it is trial and error which ones to set!

No comments:

Post a Comment