Developer forum

Forum » Development » NotificationSubscriber order of execution

NotificationSubscriber order of execution

Andrew Rushworth
Reply

HI,

When using the same Notificaiton Subscriber in two different libraries in the same solution, is there a way to control the order that they get executed?
THe reason being in that I'm getting "Unexpected exception GetContent() with the message: Collection was modified; enumeration operation may not execute." when editing the order from two separate subscribers.

Thanks,
Andrew


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Andrew,

Yes, you can control the order of notification subscribers with the Rank property. The lower number, the higher priority.

EDIT: When using Rank, you should increase the value to lower the priority instead of lowering the value to increase the priority. Basically. if you have subscriber A and B and you want B to be executed before A, you should set A.Rank = 10, instead of setting B.Rank = -10. I just wanted to clarify that part.

- Jeppe

 
Andrew Rushworth
Reply

Thanks Jeppe, much appreciated

 

You must be logged in to post in the forum