Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

isSynchronized and itemReceive event...

Avatar

Former Community Member

I'm getting itemReceive events when the node isn't synchronized. My understanding was that, in order to get items from a collection node, the node had to be synchronized. The documentation doesn't seem to address this sort of situation

My understanding was that when you call subscribe(), the node would connect to the server and you'd get a "synchronizationChange" event. Then, you'd get a "itemReceive" so that you can sync the local model with the server.

This appears to be an incorrect interpretation of the subscription process.

If you could fill in the details that I'm missing, that'd be great!

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

The usual behviour is that the CollectionNode fetches all items, and then fires itemRecieve event for each individual item and then sets the isSynchronized to true. Personally I too believe that its an incorrect interpretation, but there is strong reasoning behind that beaviour.

Thanks

Arun

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

Hi,

The usual behviour is that the CollectionNode fetches all items, and then fires itemRecieve event for each individual item and then sets the isSynchronized to true. Personally I too believe that its an incorrect interpretation, but there is strong reasoning behind that beaviour.

Thanks

Arun

Avatar

Former Community Member

Hi Sandy,

Despite Arun's protests, this is definitely expected behavior - a collectionNode is said to be synchronized when it has been connected, and received all previously stored information (including nodes and items). So you'll receive some nodes and items before synchronization (which means they were old items), and likely some after synch (meaning they are happening in "real-time".

  Check out the Developer Guide, section 3.1.5.1 - Synchronization.

nigel