more on events

S

steve

Hi,

If I subscribe using CreateAggregated and Subscribe to Files2Event event
class. on the URL for all workspaces for an identity, this allows me to
listen to ALL file events, this works fine, but when i create a NEW
workspace i don't see the events for file edits in this new workspace.

Is this by design or am i doing something wrong? I know i could code around
this but then i could get a race condition.

Cheers

Steve
 
F

Francois-Xavier JOOS

Hi Steve,

Groove Web services documentation has a note about your question:

"Note that any new objects which meet the criteria of the subscription
are not automatically included in the subscription. To include them, you
must Update the subscription. To determine when an Update may be
required, subscribe to the relevant events. For the example above, you
could create an additional subscription for the Tool2Event event class
within the space of interest. The Tool2Event class includes tool
creation events. Thus you could detect the creation of any new
discussion tools and call Update on the discussion subscription to
include events generated by the new discussion tool."

In conclusion, you need to update your subscription after you created a
new workspace (if you create them from your application).
If you need to listen to all workspace creation, use a second
subscription for this kind of event:

Event class: urn:groove-net:Space2Event
Service: GrooveSpaces
Event types: SpaceAddEventData, SpaceDeleteEventData, and
SpaceRenameEventData



Francois-Xavier
 
S

steve

I guessed this, does this mean we can get a race condication?

If a workspace gets added, I rehook into the events for the new files etc,
what happens if a file is added to this workspace in the mean time?

i know i can code around this.

Cheers

Steve
 
H

Hugh Pyle [MSFT]

In the Groove 2007 SDK, there's a new method "CreateAggregated2" which helps
here. Documentation below.

"The only difference between CreateAggregated and CreateAggregated2 is the
conditions under which new objects are added to the subscription. In
CreateAggregated2, new objects are added to the subscription as soon as they
become accessible. For example, if you create an aggregated subscription for
all Forms tools belonging to the identity, if the user adds a new Forms tool
to a workspace or accepts an invitation to a workspace with a Forms tool,
the new tool is added to the subscription immediately. In contrast in
CreateAggregated, the new tool is not added to the subscription until the
subscription is renewed with the Update operation. This more restrictive
functionality is retained for compatibility with previous versions.
"Note that this more restrictive functionality for CreateAggregated is not
only present when the Groove Web Services are provided by the Groove Data
Bridge. On the Groove Data Bridge, CreateAggregated has the same
functionality as CreateAggregated2, that is, objects are added to the
subscription without the need for a call to Update."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top