Event Broker - Event Scope

Topics: CAB & Smart Client Software Factory
Apr 28, 2005 at 7:47 AM
originally posted by: Tom_Whitner

During today's meeting, it was noted that events can be scoped to a workitem or globally. The concept of child workitems was also mentioned. This raises the question of whether a child workitem is considered part of the parent workitem from an eventing perpective. Or, put differently, is there a way for a child workitem to fire an event to its parent workitem w/o firing a global event?
Apr 29, 2005 at 4:39 AM
originally posted by: headlam

Tom, I missed the meeting, but it would seem that that king of behavior would be a requirement (i.e., the child work item fire and event that only the parent can see)
Apr 30, 2005 at 8:09 AM
originally posted by: smacksnr

I would have to agree, this should be a requirement.

A child work item should be able to fire an event which its parent could see but which is not Global. I believe a new scope is required as not all events should necessarily be visible to the parent. Also I think it should be limited to only the immediate parent as a work item could get any important grandchild events forwarded by its child.

May 3, 2005 at 2:37 PM
originally posted by: EdJez

Good point. Since the Workitem class represents an "application controller" for a use case, we had the WorItem scoped events of the application controller class fire to that same work item.

Adding a new scope might be necessary. However, I'd like to see what other suggestions folks come up with.
May 5, 2005 at 8:57 AM
originally posted by: ChristianNielsen

Scopes that I think would be interesting to have are global, local, parent, sibling and sub work item.
It would also make sense in some occasions to be able to combine scopes, i.e.local and sub work items.

Apr 7, 2006 at 9:32 AM
originally posted by: rmtuckerphx

Has this been investigated any further? It would be useful to have a ChildWorkItem publish an event at a Parent WorkItem (and all descendants) scope.
Apr 7, 2006 at 11:11 AM
originally posted by: BradWilsonMSFT

Why wouldn't global scope work for you?
Apr 7, 2006 at 1:35 PM
originally posted by: rmtuckerphx

We have a situation where a tab on a tabbed workspace represents what we call a WorkArea. When a user clicks on a left naviagation entry, a new tab/WorkArea is created that can host multiple SmartParts. Each SmartPart has its own WorkItem that is a child of the WorkArea WorkItem. In most cases each SmartPart will be a self-contained unit of work, but there are instances where we want an event on one child WorkItem to affect another sibling WorkItem within the same WorkArea WorkItem. Another instance of a SmartPart/WorkItem can exist on another tab/WorkArea, but we don't want the event to be seen by it. If the PublicationScope is Global, than other WorkAreas will see it. We want to be able to have a PublicationScope that is ParentWorkItemAndDescendants.
Apr 8, 2006 at 1:38 PM
originally posted by: davidlaribee


See the end where a "all workitems in branch" scenario is described. Not much of a leap to cover your need. Anyway, that is where'd you go to implement the desired functionality.

You could also try (assumption, haven't tested) use DataEventArgs&lt&gt and manually fire an event published in a parent workitem from a child workitem.