using scopes and notifications, how to create accu...
# help-with-umbraco
d
I have a system that manages words and relations between them. As a manager, I can create words and I can create relations between words (A is synonym of B or X is proper spelling of Z). My service provides a word model that also contains all current relations to and from that word. I find that in certain operations, my notifications are inaccurate, for example: In one single operation, I create a new word: A "CreateWord" notification is published in the scope that contains this new word In that same operation, I create a relation with a different word: A "CreateRelation" notification is published in the scope that contains the new relation The operation completes and the notifications are sent to the notification handlers: the "CreateWord" notification does not contain the relation that was just created, because at the time publishing, it didn't exist. As it happens, the CreateRelation notification is handled first, then the CreateWord notification. Now my index is out-of-sync because it's missing the relation How do you deal with this? This is Umbraco 10.6.1
heh, this is funny, I was completely wrong about the order of execution: it's actually the create relation notification that runs last, but I only updated half of all the words in the relation